Skip to content
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

Not working with dotnet sdk version 1.2.200 and 1.2.300-rc1 #99

Closed
valeriob opened this issue May 15, 2018 · 6 comments
Closed

Not working with dotnet sdk version 1.2.200 and 1.2.300-rc1 #99

valeriob opened this issue May 15, 2018 · 6 comments

Comments

@valeriob
Copy link
Contributor

If you create a new aspnet core application, add r4mvc version 1.0.0-alpha1-00260.
If you have dotnet core sdk 1.2.300-rc1 the generation fails with

The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Failure: Msbuild failed when processing the file 'C:\Users\vborioni\Documents\Visual Studio 2017\Projects\R4mvSdkProblem\WebApplication1\WebApplication1.csproj' with message: C:\Program Files\dotnet\sdk\2.1.300-rc1-008673\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.GenerateAssemblyInfo.targets: (161, 5): The "GetAssemblyVersion" task failed unexpectedly.

It works correctly with dotnet sdk version 2.1.300-preview1-008174 and 2.1.300-preview2-008533

@valeriob valeriob changed the title Problem with dotnet sdk version 1.2.200 and 1.2.300-rc1 Not working with dotnet sdk version 1.2.200 and 1.2.300-rc1 May 15, 2018
valeriob added a commit to valeriob/R4MVC that referenced this issue May 16, 2018
@artiomchi
Copy link
Member

Damn, it's frustrating that they keep messing with MSBuild and it's pretty much impossible to come up with a stable long term strategy for projects that depend on it, other than having to continuously to update to the latest pre-release versions every time they have a larger release!

@valeriob
Copy link
Contributor Author

I wanted to ask you about that.
How does it actually works ? why does a self contained app need to keep up with vs ? What's the interaction ? Would'nt any app just load msbuild dlls and parse the project structure ?
When does vs comes into play ?
Thanks

@artiomchi
Copy link
Member

Heya, I never said anything about VS. It's MSBuild that we need to use - so that's why we need to update to the latest version every time.

If R4Mvc was a VS plugin, we could just use VS's build system. But since we're running a command line app, we need MSBuild. And a number of other libraries as well.

The idea was to try and make this tool cross platform, so we need to get MSBuild from NuGet, not just from an arbitrary place on disk

@valeriob
Copy link
Contributor Author

valeriob commented Jun 6, 2018

Ok, so the problem is the interaction with msbuild plugins in dotnet sdk ?
If so maybe it's possible to use msbuild of the sdk instead of downloading or bring your own.

@artiomchi
Copy link
Member

@valeriob Nice job opening that issue in dotnet/sdk! They pointed us in the right direction, and we don't have to bundle msbuild anymore!

I've deployed a new alpha version to NuGet, since this is a great change, which should let the app work in any environment :D

@valeriob
Copy link
Contributor Author

valeriob commented Jun 8, 2018

Very good, i was about do do the pull request, but it's very trivial, thanks.
I still hope to be able to discover both dotnet sdk msbuild instance and visual studio one to lower the requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants