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

Workaround problems when opening solution files in Visual Studio #4569

Merged
merged 4 commits into from
Dec 11, 2018

Conversation

natemcmaster
Copy link
Contributor

Project reorganization and refactoring has led to a number of problems when opening .sln files. These changes are meant to mitigate issues in using Visual Studio.

Changes:

  • Condense Routing.sln into HttpAbstractions.sln
  • Workaround NU1105 by adding all ProjectReferences to the .sln
  • Workaround exceptions in the ReferencesHostBridge by moving Reference items to a temporary item group
  • Add a 'startvs.cmd' script for launching VS with the right env variables
  • Remove RangeHelper test project
  • Move RangeHelper tests into StaticFiles.Tests and add target for NPM restore

* Workaround NU1105 by adding all ProjectReferences to the .sln
* Workaround exceptions in the ReferencesHostBridge by moving Reference items to a temporary item group
* Add a 'startvs.cmd' script for launching VS with the right env variables
* Remove RangeHelper test project
* Move RangeHelper tests into StaticFiles.Tests and add target for NPM restore
@Tratcher
Copy link
Member

I don't think we need the NU1105 sln workaround, I have the build working locally without it. I'll follow up with @JamesNK.

@@ -135,7 +135,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Cors",
EndProject
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remove the middleware.sln. It's already large enough that VS is having trouble loading it. It's also not useful as none of these projects reference eachother or are worked on together. Each middleware is it's own feature area and could have its own sln.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we treat this as a separate issue?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

@Tratcher
Copy link
Member

@JamesNK wasn't able to get it working following the same steps I used, not sure why. We can try the sln workaround.


1. Executing the following on command-line:
```
.\build.cmd /p:SkipTests=true /p:_ProjectsOnly=true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/p:BuildNumberSuffix=t9999, or have you addressed that another way?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/p:BuildNumberSuffix=t9999 is only necessary in the master branch, but should be resolved by #4311. I'll add that to docs when I merge this up thru 2.2 and master.

@natemcmaster natemcmaster merged commit 5151e7b into dotnet:release/2.1 Dec 11, 2018
@natemcmaster natemcmaster deleted the sln branch December 11, 2018 22:05
@JamesNK
Copy link
Member

JamesNK commented Dec 11, 2018

I tried out building in the release/2.1 branch and there is one NU1105 error remaining for <ProjectReference Include="..\testassets\RoutingSample.Web\RoutingSample.Web.csproj" />. The sample website isn't part of the solution.

@natemcmaster
Copy link
Contributor Author

Which solution?

@JamesNK
Copy link
Member

JamesNK commented Dec 11, 2018

Ah, right: \src\Http\HttpAbstractions.sln

@natemcmaster
Copy link
Contributor Author

Yeah, I see that now too. I'll add that to the .sln in my next PR. It seems NU1105 may not appear if you have already restored the projects.

JunTaoLuo pushed a commit that referenced this pull request Dec 12, 2018
* Workaround problems when opening solution files in Visual Studio (#4569)

Changes:

* Condense Routing.sln into HttpAbstractions.sln
* Workaround NU1105 by adding all ProjectReferences to the .sln
* Workaround exceptions in the ReferencesHostBridge by moving Reference items to a temporary item group
* Add a 'startvs.cmd' script for launching VS with the right env variables
* Remove RangeHelper test project
* Move RangeHelper tests into StaticFiles.Tests and add target for NPM restore

* Convert Session to use Reference and move to Middleware folder (#4576)

* Add RoutingSample.Web to HttpAbstractions.sln
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

Successfully merging this pull request may close these issues.

3 participants