我将Visual Studio解决方案从一个文件夹复制并粘贴到另一个文件夹中,现在当我打开我在输出窗口中看到的新解决方案时(show output设置为intelliSense):
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs'.
[Failure] Could not find file 'C:\Path\To\File\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs'.
如何让这些消息消失?
答案 0 :(得分:3)
尝试删除suo文件。这似乎有时对我的情况有所帮助。
答案 1 :(得分:2)
在任何文本编辑器(如notepad ++)中打开projectname.csproj文件。找到类似如下的代码:
<Compile Include="obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs" />
<Compile Include="obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs" />
<Compile Include="obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs" />
<Compile Include="obj\Release\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs" />
<Compile Include="obj\Release\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs" />
<Compile Include="obj\Release\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs" />
删除这些行并重新启动visual studio或卸载解决方案并重新加载解决方案。
答案 2 :(得分:1)
我认为这个github问题可能就是答案:https://github.com/Microsoft/TypeScript/issues/7110
分辨率描述
&#34;烨。当这种情况发生时,roslyn正试图读取文件 显然文件不再可用或被锁定。我们&#39;再 将内容打印到输出窗口,以便人们知道这一点 他们并没有混淆为什么像intellisense这样的东西没有表现出来 关于他们项目的完整信息。&#34;
答案 3 :(得分:0)
IntermediateOutputPath
和OutputPath
目标路径的末尾没有空格。答案 4 :(得分:0)
在相关配置下执行完全重建,如果成功,则关闭并重新打开VS,那些虚假消息应该会消失。
我昨天有这个,在阳光下尝试了所有建议,但没有一个起作用。 今天早上我还有另一个,完整的Rebuild对它进行了排序。
编辑:我刚刚注意到,发生这种情况的项目没有在Configuration Manager中选择“生成”。我必须在几天前删除/ bin和/ obj文件夹才能解决另一个问题,所以这可能是由于那些旧版本的残留物没有由我的常规生成过程刷新而引起的。