开发者

Could not find file 'obj\Debug\OldProjectName.csproj.FileListAbsolute.txt

I'm trying to publish project (tools vs2010), but cannot all the time getting the error below. I paste to my projects files from another project and then I changed namespace (OldProjectName) to the parent project (NewProjectName). But it still getting information from somewhere about old project.

I cleaned solution, builded, rebuilded. Closed and reopened again and all the time the same error.

I'm able to bu开发者_如何转开发ild project but publish it.

Any ideas what can cause the problem?

Error 1 Copying file obj\Debug\OldProjectName.csproj.FileListAbsolute.txt to obj\Debug\Package\PackageTmp\obj\Debug\OldProjectName.csproj.FileListAbsolute.txt failed. Could not find file 'obj\Debug\OldProjectName.csproj.FileListAbsolute.txt'. 0 0 NewProjectName


  1. Open your .csproj file in notepad

  2. Find "obj\Debug\OldProjectName.csproj.FileListAbsolute.txt"

  3. Remove that line and save it
  4. Open your project and try to publish it and this time you will be succeeded.

Note: if you are getting any more file like .pdb remove that as well.
Hope it will help you


Make sure the obj folder is not read only, if so change read only property of this folder to false. this worked for me.


Check the permissions to the folder obj\Debug\ if you give it write permissions, the error would go away.


Check if the folders "bin" and "obj" are checked-in to source control, if so delete those two folders in source control. There is no need to check-in these two folders to source folders. Also make sure that these folders "obj" and "bin" are deleted from your hard disk, they will be created again after a build.

Hope this will fix your issue.


It is your responsibility to make copies so you can go back to one.

Open your project file (vb/cs)proj with a notepad, and search for the missing files.

In my case I got this error when I tried to publish the project and certain files were not found.

Each publish attempt I got another file name, after checking that the file actually didn't exist in the project, I removed it from the project file, manually.

Then publish succeeded.


Delete the obj folder and build again.

Ref: http://forums.asp.net/t/1402005.aspx


Like many others these files were read only and needed to be deleted or actually able to be overwritten by VS. However, as may be the case for many others, the problem was because these files were checked in to source control. Your bin and obj folders should not be in source control. Mark them for delete and submit the changelist.

One exception to the rule is for the bin folder could be dll files that are not .Net compatible. Such as a C/C++ dll that you are using through a .Net wrapper dll. I mark them as content so that they get published and check them into source control.


I too had this problem. I resolved this by deleting files inside project bin folder (.dll and .pdb) and closed and re-opened VS .


The file named FileListAbsolute.txt was deleted from the folder obj/debug. Visual Studio can automatically recreate the file and others in the obj/debug for you. For VS to recreate it, set the configuration of the solution and the project to debug mode. Then rebuild your solution.

To change the configuration mode to debug, from the solution explorer, right-click on the solution name and select Properties.

Select Configuration under Configuration Properties. Then select Debug from the dropdown list. Click Apply and OK. Ensure that in Configuration Manager, the configuration mode is also a debug mode.

Then rebuild your solution.


For me using solution here: Certain Razor views not publishing

Excluding the views folder and re-including fixed it for me. So it's possible for anyone else experiencing this it may be as simple as excluding and then including the file/folder in question of your project.


I encountered this bug using VS2017 with a solution stored in OneDrive.I suspected OneDrive's sync mechanism to be the root cause of this. When I tried to reproduce using VS2019 however it did not reappear. Looks solved in between these versions.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜