So the scenario is that I'm trying to setup TeamCity to check out our ASP.NET solution from an SVN repository and compile it using a Release profile. The checkout from SVN works fine, however compiling the asp.net solution is where things start to fall apart.
The first issue is that TeamCity seems almost bizarrely inconsistent when it comes to compiling. For instance, the first time it checks out the solution and compiles it, everything seems to work fine. However, if I force it to build after that then it gives:
error MSB6006: "aspnet_compiler.exe" exited with code 1.
and fails.
I noticed that this only seemed to be happening on one of the projects in the solution. When I removed the project everything appeared to work fine. Since the above error is no help at all, I resorted to removing parts of the solution until I found the part that (seemingly) was causing the issue.
Initially I was confident that I had identified the problem and so I cleaned everything up and tried to replicate the process from the start. I checked out a clean version and removed the 'problem pages' from the solution straight away. It didn't compile. So I'm scratching my head. It compiled before - why not now?
Anyway by this stage I've burnt a significant amount of time trying to get this up and running. Since the project that it was complaining about was non-critical I just removed the whole thing. So Team City was once again happily building the remaining projects. I leave it alone and move onto the next thing.
I come in the next day and do a force build - and it isn't compiling anymore. It's giving the same error as above but on a different project now!!!
So I'm pulling my hair out trying to work out what's going on here. My questions are:
Why does something that compiles fine in Visual Studio have so many problems in Team City?
Why is the error given by MSBUILD so vague that it's practically useless (and is there any way to get something more useful)?
Why does the solution build fine in Team City one day and not the next?
Related
I'm suddenly not able to publish my dot net core project, having made no known changes, so this seems mysteriously frustrating atm... (compounded by consistent troubles with project build issues for months now, while using dot net core for my back end server).
When I go to publish, it fails and gives me the error message:
"Publishing failed."
Inspecting the logs, I see every single razor view has a warning or error ending with the same message:
"*.cshtml (-1): Targeted tag name cannot be null or whitespace."
And finally, the commandline error:
"C:\Program
Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.mvc.razor.viewcompilation\2.0.0\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets(60,5):
Error MSB3073: The command ""dotnet" exec --runtimeconfig"
is spat out, leaving me without even enough of a hint to the problem to even know where to look.
Any ideas what kind of steps I can take to trouble shoot this sort of thing?
If I don't solve this soon I think it's the final straw with dot net core for me... I wanted to to like it... I really did... I've spent more time trying to make it simply build, (following everything by the book too!) than I've spent coding! The biggest headache was definitely the upgrade to dotnetcore 2.0... even with Microsofts instructions.
As I noted in commets I had the same issue as you. I didn't do any significat changes in codebase but suddenly encountered that msdeploy package is failing to built. At the same time rebuilding project in vs and via cli works fine.
It may sound very silly but I just removed obj and bin folders in my project and after then dotnet publish started working fine as before.
I had <Private>false</Private> under one of my References. Simply removing it fixed my issue. I got the idea from here: https://stackoverflow.com/a/46066976/1777780
If deleting bin and obj and restoring then publishing/running do not work for you, try removing anything that appears to be unneeded from your proj.
It's an aspx web site. It's Huuuge. Oftentimes, we won't see errors until building the entire site. But it's always told us where the error is.
This time, I'm getting an Object reference not set to instance of an object. error with file, no line, no location. Double clicking on the error just does... nothing.
Error 3 Object reference not set to an instance of an object.
I've tried a few things that I've found here and elsewhere but nothing seems to be helping out or giving me more information. I've tried change the verbosity of compiler/build messages but those goggles don't seem to help.
Edit: Very specifically, the first time I try to build the site after opening the project, it says it builds just fine. Trying to build it again causes the error. Closing VS (2013) and reopening the project allows a first time build success and subsequent builds are failures. It should also be noted that it's not actually building anything because it completes far far too quickly - almost instantly.
Can anyone give me some ideas on how to track this down?
It turns out that the VS installation is completely broken. Banging on the keyboard like a monkey and then trying to build succeeds when it should not.
I have this issue. I have seen others post about the same thing. I have tried every solution that I have found on each post I've seen.
I've cleaned and re-built.
I've gone to the solution properties and updated the configuration to 'Debug' from 'Release' (took several tries to get this to stick).
I've gone through Tools > Options > Debugging > General and unchecked the box for 'Enable Just My Code'.
I've cleaned and rebuilt after each change, then made sure that my change was still in effect before continuing.
With most of these changes it would work once, but when I would close the web page (which I would need to in my testing) and then re-open it the break points would stop working and give me this error. Every time I would come back to see if I could find something else to help. I've run out of options and really need this to work.
This is a project that is using VS 2013, Run in Chrome Version 47.0.2526.106 m, and using .net 4.0. The code is in my desktop, a fresh pull from GIT, I have windows 7 on a dell i7 Optiplex 790.
I am not sure why, but adding a place for caching the symbols allowed them to load. Originally this was blank. Now it seems to be working. Even though it doesn't appear to be actually using the folder I set. I have started and restarted the project a couple of times and the break points will still be hit.
Thanks to #Ernesto I did go through that question, but there wasn't anything there that I had not already tried or that I could try.
I'm currently using Web Essentials 2013 v2.5.3 in VS2013. I use LESS for building my stylesheets.
Up until recently everything regards LESS was working fine, make a change, save and the resulting CSS was updated automatically.
Now for some reason, I intermittently get the behaviour where the resulting CSS is not updated and the following error displays in the VS bottom bar:
Compiling 0 dependent file for style.less
Once the problem starts happening, the only apparent way to fix temporarily is to restart VS. The problem then stops for a while but comes back again at some point later.
I recently installed the Productivity Power Tools (PPT) extension and only noticed this behaviour after that was installed. However I've now disabled PPT and the problem still reoccurs. So this may or may not related.
I've also quite recently tried ReSharper for a while then disabled it some time later so again, that could be related.
Any ideas appreciated.
UPDATE 1 2015-05-14
I noticed that when this happens I'm getting the following message in the "Build" window:
Something went wrong reaching: http://127.0.0.1:62583/?service=LESS&sourceFileName=C:/Path/To/Project/ProjectDir/Content/style.less&targetFileName=C:/Path/To/Project/ProjectDir/Content/style.css&mapFileName=C:/Path/To/Project/ProjectDir/Content/style.css.map&sourceMapURL&autoprefixer&autoprefixerBrowsers=last 5 versions
I've worked out what is causing this to happen. Everything is fine until I attempt to edit and save a JS file. The following is then sent to the Build output window:
Something went wrong reaching: http://127.0.0.1:14886/?service=JSCS&sourceFileName=C:/Path/To/Project/ProjectDir/Scripts/order.js
Any time after that, I get the error message when trying to save the LESS file as well so I'm assuming that whatever is breaking within the JSCS world of Web Essentials is also then causing the LESS compilation to also break.
I've fixed it by effectively almost disabling JSCS using the answer submitted here by Bryan Rayner.
LESS files seem to be back to compiling as normal.
Working on an ASP.NET Project (not Web Site) and trying to Start without Debugging from Visual Studio.
First this:
alt text http://uploadimages.epiforge.com/Crash.png
Then this:
alt text http://uploadimages.epiforge.com/Burn.png
Once completely reinstalled Microsoft Visual Studio 2008 and it was fixed... for a while.
Looking for any information I can find, including:
What in the Hell is going on?
What way is there to fix it other than completely reinstalling VS2008?
How can it just be fixed permanently?
Try this - shouldn't take more than a minute or two.
Create a brand-spanking-new, empty Web Application Project. Enter something like "hello world" on the default.aspx page. Run it.
If your problem disappears, you've got something (3rd party DLL, etc) referenced in your project causing the issue.
Else, your looking at an OS, IDE or other environmental issue. I've had some odd VS issues in the past on Win7 that were solved by available updates. I still have to run VS as an administrator to use the "attach to process" for debugging.
update
So, the new project works, which tells us that the problem is somewhere in your old project. This is where the fun part starts, which is what I like to call "binary search debugging." It's crude, a pain in the ass, and if your app is pretty complex, sorting out dependencies can be a pain in the ass.
Create a new project and add all of your source to it.
Build, run. Did it work?
No? Remove half of the source.
Build. run. Did it work?
If so, the problem is in the half that you removed.
Else, it's in the half that remains.
Now, I know this is an incredibly naive approach to debugging, and its very brute-force, and some app configurations can make this damn near impossible, but at least its straightforward.
Any other service listening to the port number you're using? Try changing the port number or use IIS instead of running it on cassini.