开发者

How to get rid of warning in temporary files created by VisualStudio?

How do I get rid of warning in temporary files created by Visual Studio? Here is one warning,

The type '_Default' in 'c:\Users\C开发者_StackOverflow中文版huck\AppData\Local\Temp\Temporary ASP.NET Files\website\364dc771\93d88a82\App_Web_i23ljiiw.0.cs' conflicts with the imported type '_Default' in 'c:\Users\Chuck\AppData\Local\Temp\Temporary ASP.NET Files\website\364dc771\93d88a82\App_Web_lxdd1z4z.dll'. Using the type defined in 'c:\Users\Chuck\AppData\Local\Temp\Temporary ASP.NET Files\website\364dc771\93d88a82\App_Web_i23ljiiw.0.cs'. c:\Users\Chuck\AppData\Local\Temp\Temporary ASP.NET Files\website\364dc771\93d88a82\App_Web_i23ljiiw.0.cs 134


I had a similar problem recently and the issue was down to one of my classes not being wrapped around a namespace. Even though the class name was unique .net was throwing a hissy fit telling me it was clashing with another type or class.

There were no errors when debugging locally - this error only occured on the production server.

After I wrapped a namespace around my class, this issue was resolved. Hopefully this information will help you out or at least points you in the right direction.


Write a batch file like the sample and add it to build events:

@echo off

echo *** Deleting ASP.NET temporary files (.NET 4.0)... ***

echo Deleting 32-bit files...
rmdir "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root" /Q /S

echo Deleting 64-bit files...
rmdir "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root" /Q /S

pause
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜