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
Use Net Core App 3.0 #205
Use Net Core App 3.0 #205
Conversation
When building in the CI environment, using .NET Core 3.0 Preview 2, the netcoreapp2.0 target is not available, so it is failed to run when running using `dotnet reportgenerator` tool.
I installed the latest SDK (3.0.100-preview-010184). |
I believe not. But I was not able to compile locally your project to verify that. build.bat does not work for me in the plain CLI, but I did not try inside Developer Command Line. If you give me rough steps how to build, I could try build form master locally, so I reduce frictions on your side. |
You should be able to compile the project if you open it in Visual Studio 2017. |
Indeed there issue with build in VS2017 and .NET Core 2.2 SDK. Looks like it is not so trivial like I initially thought.
I honestly do not see right now smooth path to make build support both VS2017 and VS2019 without some MSBuild trickery. I could create control build to build .NET Core 2.0 only, or .NET Core 2.0 + 3.0 depends on the MSBuild property, but still this require split solution on half probably which is not practical for you as I understand. So better to discuss that. |
I also did some experiments. There is no easy way to fix this at the moment. In the meantime you can also use the global tool. |
+1 to this PR - I'm testing applications where we install the relevant SDK version only into the CI machines to compile the application, which at present breaks our .NET Core 3.0.0 branch using preview 2. For now we've just had to comment-out use of ReportGenerator. |
Since the build is currently failing within VS 2017, I did some manual setup to create the Nuget package. Please try this release and let me know if it works for you: My changes are tracked in this branch: |
Great, thanks! I’ll try it out on Monday. |
Unfortunately it doesn't work. The dependency tree specifies |
I guess it's this that needs tweaking while it's still in preview:
|
Thanks for your feedback. <dependency id="Microsoft.NETCore.App" version="3.0.0-preview-27324-5" exclude="Build,Analyzers" /> Please try again with this new package: |
Thanks - I'll give the new one a try 👍 |
I've just tried this, but this doesn't quite fit with my scenario. I'm currently using DownloadOpenCoverToPath $openCover
& $openCover -target:dotnet -targetargs:test -output:$reportPath
& dotnet $whereReportGeneratorIsOnDisk -reports:$reportPath Using Either I'm doing something silly and this isn't how I should be doing this scenario and I need to change the approach, or I need a different package that supports 3.0. The general approach is that I'm downloading the .NET Core SDK and putting it on the path at a local location and trying not to install anything globally as our CI build machines are not ephemeral and I don't want to pollute the image for other unrelated builds that might run later on the same agent. An updated build of the global tool might work as I could install that at a custom location? |
I think at the moment we just have to wait unit .NET Core 3 is released. In #211 @Jsparham777 requested support for 2.2 I don't understand why every every release of .NET Core requires a special package targeting that version.
|
I just tried it myself on a machine with only "SDK 3.0.100-preview-010184" installed. I added the following to my *.csproj file:
And it just worked. |
DotNetCliTool seem to be no longer supported: I will add support for .NET Core 3.0 in the global tool. |
I was just pointed to this tweet from Nate McMaster. It might fix this problem ahead of 3.0 being released and unblock people using previews: https://twitter.com/natemcmaster/status/1123281393377693696?s=21 |
I added support for .NET Core 3.0 in the following packages: |
When building in the CI environment, using .NET Core 3.0 Preview 2, the netcoreapp2.0 target is not available, so it is failed to run when running using
dotnet reportgenerator
tool.