Visual Studio 2015 - Shared Projects Reference Tab Missing on Web Project

后端 未结 1 696
眼角桃花
眼角桃花 2021-02-01 18:15

I upgraded to Visual Studio 2015 from our MSDN subscription because I was pretty excited to read about Shared Projects... No more managing 21382 nuget packages in our dependenci

1条回答
  •  野的像风
    2021-02-01 19:03

    [Temporary Answer]

    I was able to work around the problem by manually editing the csproj file for my web application.

    Here are the steps:

    1. Unload the web application project
    2. Edit the *.csproj file by right clicking the project and clicking edit...
    3. Now look for the ProjectTypeGuids element.

      {349C5851-65DF-11DA-9384-00065B846F21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}

    The first guid is the guid for an ASP.Net MVC 5 Project, and the 2nd guid is for C#.

    All you need to do is temporarily remove the first guid and the semicolon, leaving just the c# guid (the 2nd one).

    Reload the project and add your shared projects. Once they are all added, edit the project file and put the first guid and the semicolon back.

    Reload the project.

    The Shared Project reference will still be there, and it will build and link into your web application.

    Optionally, you can just manually add the shared project referrence, the format is like this

    
    

    0 讨论(0)
提交回复
热议问题