CSC error CS2001: Source file 'myfile.cs' could not be found
Hi All,
I am using TeamCity Professional 6.5.1 (build 17834).
I have a number of builds which have starting getting the following compilation errors :
CSC error CS2001: Source file 'myfile.cs' could not be found
There may be several of these during a compilation.
They are builds which connect to TFS 2010 as the version control have a VCS checkout mode of 'Automatically on server' and have a Visual Studio 2010 Build Step.
Obviously for whatever reason some files are not ending up on the build agent hence the error but I cannot figure out why.
I have tried the 'Clean all files before build', 'Enforce overwrite all files' and have manually deleted the cache folder on the server.
Any help would be most appreciated.
Thanks
Kevin
Please sign in to leave a comment.
Hi Kevin
Please check this file actualy exists in the repository, and you can access it by Team Explorer.
If so, please post teamcity-vcs.log
Thanks
I am also facing similar issue.
In my case I am using link inside a project with relative path.
<ItemGroup>
<Compile Include="..\BuildResources\CommonAssembly.cs">
<Link>Properties\CommonAssembly.cs</Link>
</Compile>
<ItemGroup>
Following is the build error receiving from teamcity:
instead of including file from C:\BuildAgent\work\12e5033e0ef0f0bf\BuildResources\CommonAssembly.cs, teamcity is trying to use location 'C:\BuildAgent\work\12e5033e0ef0f0bf\TestApp.Data\..\BuildResources\CommonAssembly.cs'
How we can fix this issue ?
Not getting any response for this query so added the issue as new POST.
https://teamcity-support.jetbrains.com/hc/en-us/community/posts/115000724210-CSC-error-CS2001-Source-file-C-BuildAgent-work-12e5033e0ef0f0bf-TestApp-Data-BuildResources-CommonAssembly-cs-could-not-be-found