-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can we avoid problems with different .NET versions? What's the best way to distribute the compiler? #886
Comments
dotnet standard? |
What is this? <Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="dotnet $(NuGetPackageRoot)neo.compiler.csharp/$(NeoCompilerCSharpVersion)/tools/$(TargetFramework)/any/nccs.dll $(ProjectDir)" />
</Target> Create directory called But remove "neo.express": {
"version": "3.5.20",
"commands": [
"neoxp"
]
} then add below to your <Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="dotnet nccs "$(MSBuildProjectFile)" -o "$(SolutionDir)sc"" />
</Target> |
Hi @cschuchardt88, This part is important:
There are two reasons for this:
There are problems when we request users to use nccs directly from the command line. |
I've got this error: Then, after using the command, it worked, but it was 'manually' (using the dotnet tool restore command). I wondered if we could do that without using it as a tool. The compiler is not a .NET tool. It's just a DLL. It would be easier to use the version in the csproj file instead of requiring another folder with a configuration file. I did another test using this configuration, and it worked. The problem is that the project can't have it as a dependency because it's a tool. I don't know how I installed it using nuget before, but somehow, I did it... and it worked.
The DLL is there, and this command works. The only line causing issues is the package reference:
Maybe we could release another package that is not shipped as a tool? Or is it possible that the same package can be tweaked to work as a tool and as a DLL? It already works... it just need to let me download it 😂 |
Please Completely Read and Try itIf you listen and do what I am saying. Your problems will go away. You need to create No need to Directory LayoutC:.
| AppLog.sln
|
+---.config
| dotnet-tools.json
|
\---AppLog
AppLog.csproj
Contract1.cs > dotnet new tool-manifest
The template "Dotnet local tool manifest file" was created successfully. > dotnet tool install neo.compiler.csharp
Skipping NuGet package signature verification.
You can invoke the tool from this directory using the following commands: 'dotnet tool run nccs' or 'dotnet nccs'.
Tool 'neo.compiler.csharp' (version '3.6.2') was successfully installed. Entry is added to the manifest file > dotnet build
MSBuild version 17.8.3+195e7f5a3 for .NET
Determining projects to restore...
All projects are up-to-date for restore.
AppLog -> AppLog\bin\Debug\net7.0\AppLog.dll
Determining projects to restore...
All projects are up-to-date for restore.
Compilation completed successfully.
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:03.64 Add to your
|
Hi. A few questions:
Another issue is that the compiler is distributed as a tool. You can't add it as a dependency to your project.
When users visit Microsoft to download .NET, it recommends .NET 8.0. The same happens if you install it using the command line. Shouldn't the compiler work with the latest .NET version? |
Should be, with dotnet core i dont think so.
We are moving to standard
We already started the process.... Looks it done already
We are working on that too. |
Yes. We should move to .net8 |
Hi,
One issue we almost always see when testing C# with new developers is errors related to .NET versions. You may not notice this because you likely have multiple .NET versions installed.
Situation:
During a test, a user had .NET 8 installed and had to install .NET 7 to use the compiler. According to his report, he tried to install the compiler using the
dotnet tool
. It failed because he didn't have .NET 7.0. He had to install it to use the compiler.Questions:
In order to allow the compiler to be automatically downloaded, we were adding it to the NuGet dependencies and invoking it like this in the post build process:
Note: I have .NET 7.0 installed.
However, this used to work.. I guess? Or we were using some other dll. What I know is that today, it doesn't work:
The error:
And this error:
I'm not really sure what the problem is or how to solve it. Even writing this message was hard for me. Can someone enlighten me?
The text was updated successfully, but these errors were encountered: