Issue when precompiling/build a .NET website

Hi,

I'm trying to setting up a CI process for a .NET solutions I developed.
It consists in a website referencing some class library (in the same salution) and some nuget packages.
I've never had any problems while building/publishing it using VisualStudio...
I followed all the steps and I'm going crazy with a problem it gives when trying to build the website.
I setup TeamCity for building the solution so when the build starts all the projects are built correctly but, when Teamcity runs this command

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe  -v /AspWebsite -p AspWebsite\ -u -f PrecompiledWeb\AspWebsite\

It run up with a lot of erros like these

[AspNetCompiler] c:\TeamCity\buildAgent\work\350585948190b5b7\AspWebsite\App_Code\dao\guidDao.cs(5,  0): error CS0246: The type or namespace name 'AtC' could not be found  (are you missing a using directive or an assembly reference?)

[09:52:51][AspNetCompiler] c:\TeamCity\buildAgent\work\350585948190b5b7\AspWebsite\App_Code\blogic\SuggestionFacade.cs(1,  0): error CS0246: The type or namespace name 'AtC' could not be found  (are you missing a using directive or an assembly reference?)
[09:52:51][AspNetCompiler] c:\TeamCity\buildAgent\work\350585948190b5b7\AspWebsite\App_Code\MyModule.cs(2,  0): error CS0246: The type or namespace name 'AtC' could not be found  (are you missing a using directive or an assembly reference?)
[09:52:51][AspNetCompiler] c:\TeamCity\buildAgent\work\350585948190b5b7\AspWebsite\App_Code\blogic\localizationservice.cs(4,  0): error CS0246: The type or namespace name 'AtC' could not be found  (are you missing a using directive or an assembly reference?)
[09:52:51][AspNetCompiler] c:\TeamCity\buildAgent\work\350585948190b5b7\AspWebsite\App_Code\blogic\localizationservice.cs(5,  0): error CS0246: The type or namespace name 'AtC' could not be found  (are you missing a using directive or an assembly reference?)
[09:52:51][AspNetCompiler] c:\TeamCity\buildAgent\work\350585948190b5b7\AspWebsite\App_Code\blogic\localizationservice.cs(6,  0): error CS0246: The type or namespace name 'AtC' could not be found  (are you missing a using directive or an assembly reference?)
[09:52:51][AspNetCompiler] c:\TeamCity\buildAgent\work\350585948190b5b7\AspWebsite\App_Code\blogic\ICurrencyFacade.cs(2,  0): error CS0246: The type or namespace name 'AtC' could not be found  (are you missing a using directive or an assembly reference?)
[09:52:51][AspNetCompiler] c:\TeamCity\buildAgent\work\350585948190b5b7\AspWebsite\App_Code\blogic\askservice.cs(5,  0): error CS0246: The type or namespace name 'AtC' could not be found  (are you missin

etcetcetc

and the build fails.
The problem seems that the website cannot find the referenced projects (the other projects belonging from the same solution and that have been succefully build).
Maybe the DLL generated of the referenced projects are not copied in {website}/bin directory?
I can't figure it out how to solve this issue.
Can somebody helped me?
Thanks in advance

Leo



Attachment(s):
Untitled.png
1 comment
Comment actions Permalink

Hi Leo,

Could you try to run the same build not using TeamCity? Please run the build on the same machine as the TeamCity agent and under the same user that the agent is running, with the same environment variables and the same working directory (steps are described in this doc section).
Please check where is the DLL generated by the referenced projects located?

0

Please sign in to leave a comment.