VS 2012 Project Compile errors over seven missing

2019-08-04 17:35发布

Looking to learn more about visual studio extensiblity specifically new languages I came across this SO question with linked project. Is there a custom language add-in for Visual Studio 2012 / VS11?

The OP question was along the lines of what I was wanting to learn and the accepted answer looked very good. At the end the answer contained a link to the "prepared solution" after the updates he recommended making. It is this "updated" project that I downloaded and upon compile get 7 errors all virtually the same. There are also 7 warnings and the warnings seem related to the errors. The problem is that my knowledge is insufficient to make the connection and implement a resolution.

The warnings all go like this:

The file 'VisualStudioIntegration\Common\Source\CSharp\RegistrationAttributes\WebSiteProjectAttribute.cs' could not be added to the project.  Cannot add a link to the file ...long path...\WebSiteProjectAttribute.cs. This file is within the project directory tree.

The matching error is:

Source file 'VisualStudioIntegration\Common\Source\CSharp\RegistrationAttributes\WebSiteProjectAttribute.cs' could not be found

Trying to solve this myself I found this SO post The file could not be added to the project. This file is within the project directory tree error

and the recommend looking in the proj file which I did and found 7 entries that match the warnings and errors.

 <ItemGroup>
<Compile Include="$(CommonRegAttributes)\WebSiteProjectAttribute.cs">
  <Link>RegistrationAttributes\WebSiteProjectAttribute.cs</Link>
</Compile>

The so post said to delete the Link tag line but not understanding the connection I'm not sure that would be the smart thing to do.

So my question after all of this is what is the connection and what should I do / learn more about to resolve these errors.

Thank You


Further testing I saved the .proj file off and deleted the links. The warnings go away but the errors saying it can't find the files remain....


I think I found them. Bad package design. Did a global search for the files on disk and found them in the 2010 sdk folder. They were referenced to the file structure of the person who built the package...which go figure is not my structure. Change vs project to include the files and all looks good. to include files

0条回答
登录 后发表回答