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

Project already has compile errors when there are none #6

Closed
sebasijan opened this issue May 14, 2017 · 15 comments
Closed

Project already has compile errors when there are none #6

sebasijan opened this issue May 14, 2017 · 15 comments
Labels

Comments

@sebasijan
Copy link

I am having this error pop up when I try to Resolve Unused References on my project:

Project MyProject already has compile errors. Please ensure it has no build errors and retry removing references.

I did originally have a compile error on another project in the same solution, but I have since completely removed that project and cleaned and rebuilt the entire solution.

After trying again I still see the same message.

Note that I am seeing this whether I select to resolve Nuget packages or not.

Has anyone else experienced this?

@Smurf-IV
Copy link

Yes, I am also seeing this in Vis2017.2 Pro.

  • Project did have a compile error.
  • Rebuilt - Went away
  • Tried this tool
  • Complained as above
  • Performed Clean, and rebuild
  • Same outcome
  • Closed studio and reopened, load solution
  • Use tool, Same ..
    Please fix.
    Note: Solution projects are targeting .NET 4.7

@subatta subatta added the bug label May 19, 2017
@subatta
Copy link
Owner

subatta commented May 19, 2017

@Smurf-IV @sebasijan : are you guys by any chance working with VS 2017 15.1 26403.7?

@Smurf-IV
Copy link

Currently 15.2 (26430.6) Release, not 7 as you have put.
VS is not showing any updates...

@sebasijan
Copy link
Author

@subatta Mine shows Version 15.1 (26403.7) Release

@Smurf-IV
Copy link

@sebasijan @subatta Community / Pro / Enterprise?

@sebasijan
Copy link
Author

@Smurf-IV Community

@Allinuon
Copy link
Contributor

Allinuon commented May 31, 2017

It seems to be caused by the new syntax options in C# 7 which requires MSBuild 15; ResolveUR only supports version 14 and earlier.

I added logic to check the following paths for the current MSBuild.exe:

  • %VSINSTALLDIR%\MSBuild\%VisualStudioVersion%\Bin\amd64\MSBuild.exe
  • %VSAPPIDDIR%\..\..\MSBuild\%VisualStudioVersion%\Bin\amd64\MSBuild.exe
  • %VSINSTALLDIR%\MSBuild\%VisualStudioVersion%\Bin\MSBuild.exe
  • %VSAPPIDDIR%\..\..\MSBuild\%VisualStudioVersion%\Bin\MSBuild.exe

The revised Constants.cs and MSBuildResolveUR.cs files are attached.

ResolveUR.Library.20170531.zip

@subatta
Copy link
Owner

subatta commented Jun 2, 2017

@Allinuon : I went through your files. Thanks for making those changes, they should address some of the error issues. Could you please submit a pull request? I'll merge them in so we can have a release?

@subatta
Copy link
Owner

subatta commented Jun 5, 2017

Thanks to @Allinuon, the issue might now be resolved. VS2017 with C# 7.0 syntax was causing issues. MSBuild paths have now been updated and build should be fine with the 3.4 version just released.

@sebasijan @Smurf-IV : could you update to this version and confirm you're good? Thanks!

@sebasijan
Copy link
Author

sebasijan commented Jun 5, 2017

@subatta I downloaded the zip, but have no idea where to save the files - any hints?

Never mind, the update appeared on VS after I posted this. Trying it out now

@sebasijan
Copy link
Author

@subatta @Allinuon It now appears to run, but takes an extremely long time, to the extent that I am pretty sure it has crashed or failed somehow.

Not sure if I can post anything here which may be useful - let me know.

@subatta
Copy link
Owner

subatta commented Jun 6, 2017

@sebasijan : could you run it on couple different projects and see the same?

@subatta
Copy link
Owner

subatta commented Jun 14, 2017

Closing issue as resolved.

@subatta subatta closed this as completed Jun 14, 2017
@omsharp
Copy link

omsharp commented Oct 20, 2017

I have the same issue with version 3.4 on VS2017 15.4.0

@ASPCKenneth
Copy link

Same issue here on MVC project in VS2017 fully updated to last version 15.4.4

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

No branches or pull requests

6 participants