Visual studio 2010 rebuilds with no modifications? - visual-studio-2010

I found something strange when i was building a project, after I built my project, I can get the latest output file (.exe) and then I tried building the project again.
As far as I know, at this time visual studio won't make a new output file again, but it made a newer file again even though I didn't modify any source codes.
Why is this happening?

as i know, at this time visual studio must not make a new output file again.
Visual Studio rebuilds the file even if there are no code changes.

Visual Studio does not recompile if there no changes, but always generates (build) a new executable.

Related

Visual Studio 2019: Builds succeed even if Content files are missing

I have a project in Visual Studio 2019 and I met a situation, when there were files with Build Action set to Content missing on a disk but present in project (listed in .csproj file). My local build finished successfully, but when I checked this code to TFS, build on the server failed because of missing files.
I wonder if there is any instrument to force VS compiler to look at Content files and check if they exist.
Thanks in advance for any advice.
Maybe you should have a look at the Visual Studio Plugin Show Missing Files 2019.
Disclaimer: I do not have any experience with this plugin myself, it just seems to fit your situation.

Type Script is not generating JavaScript in my Visual Studio Community edition 2015

I am using Visual Studio Community edition 2015 for development, I have added *.ts file to my project but its not automatically compiling. Also it does not show JavaScript preview pane. This post How do I enable the preview panel for TypeScript files in Visual Studio 2015? says that it's not supported anymore. That's fine, but why it's not compiling?
I referenced Missing Typescript Options in Web Essential for Visual Studio 2012
It says Split panes have been reintroduced in the latest version of web essentials http://vswebessentials.com/features/typescript but I can not see it
I do have typescript exe in following folder
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.5
I do have settings in Project Properties as follow
I do have settings as follow in Visual Studio
I see comment in http://www.typescriptlang.org/ as below
"Visual Studio includes TypeScript in the box, starting with Visual Studio 2013 Update 2. You can also edit TypeScript in VS Code, WebStorm, Atom, Sublime Text, and Eclipse"
What may be issue?
Solution
My "typings" file for jquery was out dated, I upgraded it and it resolved other errors and build was success, then JS files got generated.
Below post helped
JQuery definition screwed up with TypeScript 0.9
I can not close this question because I am still not able to get 'Preview Pane"
I regularly encounter this issue in VS 2015 and VS 2013. My solution is not a pretty one, but it works for me...
Close Visual Studio
Go to your scripts folder, delete all JavaScript files that have corresponding TypeScript files (only necessary to do this for TypeScript files that you have created for your project)
Open Visual Studio, clean, and build
If this doesn't work, open each TypeScript file, change one character, Save, re-build... hopefully the file will re-compile.
If this still doesn't work, open a Node.JS command prompt, change directory to the scripts directory, run;
tsc "yourfile.ts"
If this doesn't work, you've got bigger problems.
Make sure that you highlight the project in the solution explorer and then click the icon at the top that says "show all files" after you have compiled the project. You will then see the .js and maybe a .js.map file (greyed out). Select the files and then right click and 'include in project' and things should be good from there.
Some false-errors in my ts caused the issue, fixed by uncheck "Do not emit outputs if any errors are reported"
(The false error is from an outdated DefinitelyTyped file, the generated js file does not have any error.)
Maybe not having the option to expand the .ts file and see the generated .js can cause a confusion here.Try to compile your solution. Click on Show All Files and you must see all the .js generated in the same folder of your .ts files. Include your .js in the project if you want to have them visible as part of the solutions. Hope this helps
I know you say you added the .ts file but did you right-click and select 'include in project'. This will add it to the list of files that Visual Studio will check for TypeScript transpiling.
You need install Web Essential then restart the Visual studio -> clean Solution -> Rebuild it should work.

Do not compile t4 file

Suddenly, after doing a TFS 2010 get, Visual Studio 2010 is attempting to compile my .tt file as if it was c#.
Moreover, anytime I set it to "Build Action=None", Build Action gets mysteriously reset to Compile. This is breaking our builds on the desktop. I can get builds to work on the desktop by closing then reopening VS.
Our builds on TFS are totally broken because of this. What to do?
The template generates a (totally ok) c# file, so I need the project to build.
I tried changing the file extension from .tt to .donotbuilddammit but that had no effect.
Are you by chance using the Clairus T4 plugin (or another T4 intellisense provider)?
If so, try making sure the files are not open when you change the BuildAction setting.
Visual Studio builds intellisense
based on the compile action of your
files. It will only provide
intellisense for files that are marked
as "compile". Because of that, we
change the build action when the file
is open, and we change it back to
whatever it was before when checking
in, closing the file, closing Visual
Studio and also when opening Visual
Studio (in case it crashed)
See: http://forums.clariusconsulting.net/viewtopic.php?f=12&t=445

Visual studio 2010 project with per file custom build tools compiles one file at a time

I've got a project that used to work in VS 2008 that has a custom build tool for each file (runs a batch file) that used to work as expected.
On upgrading to VS 2010 when you build the project it only builds one of the source files, then stops without errors.
If I compile each file individually they work fine. If I repeatedly build the project it builds each source file in turn until they are all done.
I suspected the conversion process so re-created the project from scratch and it had the same issue..
any ideas?
Thanks
Trev
Apparently, this is by design in Visual Studio 2010:
http://connect.microsoft.com/VisualStudio/feedback/details/572435/only-1-custom-build-step-is-executed-in-a-build
There is a little more discussion here:
http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/3de31464-46fb-40a3-a666-496355b1b6be/
I'd love to have a work around for this.

Why does one of my project's GUIDs change when I build the project in VS 2005?

For two of my VS 2005 C++ projects, VS wants to write to the .sln file when I build the projects. I have got a number of other VS 2005 C++ projects where this is not the case. It is a problem as due to the fact that we have ClearCase source control integrated with our VS 2005 installations and when we try and run an overnight build via batch files, the build pauses as a ClearCase check out dialog box is displayed.
Looking at what VS is changing in the .sln files, it is the second GUID on the project line.
Before building:
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InterCommClientB", "InterCommClientB.vcproj", "{A2AF232A-7F27-4340-81D5-8ABFD10994D2}"
After building:
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InterCommClientB", "InterCommClientB.vcproj", "{67BE85B7-3234-484E-88FB-4F0E42096583}"
Any help gratefully received. I am new to VS 2005, as we have only recently migrated from VC++ 6.0, so apologies if I have missed something obvious.
We are running VS 2005 Professional Edition, with SP1 installed.
Regards,
Greg.
I had similar problem. It seems that when converting projects from old versions of VS (like 6 or 2003) VS 2010 is not adding Project GUID to the .vcxproj file. Because of that when you open solution including such project VS will recreate GUID for such project, and will change .sln file but will not change .vcxproj file. So another time you open such solution the situation will be the same and the .sln file may change again.
See this: http://connect.microsoft.com/VisualStudio/feedback/details/586258/missing-projectguid-in-vcxproj-files
I am guessing here, but it looks like some changes have been made to the InterCommClientB project(project, not the files in the project). When this happens the sln is updated, in this case only the project GUID.
My best guess to resolve this issue would be to manually build the solution and then checkin the changes. This way the sln file won't change on build.
My second best guess is that you already made this changes at your computer and it is working fine, but you did not get lattest version on the pc where you do the night build .
This might be totally out there - but sometimes Visual Studio fails to check-in a Solution file when it's been modified and while the Solution is open in Visual Studio. Try closing Visual Studio, and only then committing the Solution file.
If it isn't that, there might be some other agency causing the Solution file to need to change the GUIDs its using. In one instance, I was using .NET tools from National Instruments, and they has a licensing scheme that would trigger that sort of action (modification of extraneous files for not good reason) whenever I went to do a rebuild.
Please take a careful look at the output from the build (in the log, or the output window) - you may find some further clues there!

Resources