I was just about to check some code in when I noticed that Visual Studio had created a .datasource file. My question is what are these files and should they be checked in?
Thanks.
Sachin
Related
Is there a way to change where visual studio looks for project files(.vcxproj)? So I can keep all visual studio related files in separate VS folder and have my project still open and save correctly in visual studio.
I figured it out. I can open up visual studio's solution file (.sln) in notepad and edit the path to the project file there. It's can be done on this line:
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Solution", "Project/Project.vcxproj", "{E3671A4E-1047-4D41-8AF1-EA19EAC2C601}"
So right now the .sln file is looking for the project file within 'Project/'. All I have to do is change the path here in relation to the solution file.
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.
A friend sent me his visual studio project that contains 2 files:
naomi.sln
naomi.v12.suo
When I try to open the first file I get the error in visual studios:
One or more projects in the solution were not loaded correctly. Please see the Output Window for details.
How can I open the project?
You don't actually have the project (only the solution - .sln file). The project file should have .vcproj or .vcxproj extension. The .suo file contains some solution user data (as seen in [MS.Docs]: Solution User Options (.Suo) File). Get the project file that the solution references, and you'll be able to open it.
I imported a snippet, and I want it gone. Problem is that the Snippet Manager has the Remove button grayed out when I go in and try to remove it, any ideas?
Chances are that code snippet was imported to Program Files folder (e.g. C:\Program Files (x86)\Microsoft Visual Studio 11.0\Web\Snippets\CSS\1033\CSS) instead of C:\Users\\Documents\Visual Studio 2012\Code Snippets
Snippet Manager displays the location of selected snippet, just go there, delete it manually and restart Visual Studio.
Yes, this is because you can only remove directories and not individual snippets (at least from the Code Snippets Manager, you know, Microsoft style!):
To remove a directory from the Code Snippet Manager, select the
directory that you want to remove.
Reference:
https://msdn.microsoft.com/en-us/library/9ybhaktf(v=vs.100).aspx
For Ubuntu users, please remove snippet files in ~/.config/Code/User/snippets
Not sure if applicable for other Linux distributions.
I created a C# project and added it to source control (mercurial). I can edit files in VS, commit it and push it using TortoiseHg. It goes to the server. When some one pulls they get the files.
In my visual studio I added a folder and a file inside that folder. I used TortoiseHg and it saw the new file in the new folder. I committed it and pushed it.
However, now someone pulled the latest code from the server - and they got the new file (it is visible through windows explorer), but when they open the solution in VS, they don't see the file.
Does someone have an idea what is wrong here? or things I should check? Thank you for the help.
P.S. I have visual studio 2010 express (so I can't use the VisualHg plugin).
Visual Studio caches changes to the solution and project until an explicit save or a build. In your comment:
In my visual studio I added a folder and a file inside that folder. I used TortoiseHg and it saw the new file in the new folder. I committed it and pushed it.
I see that an updated .sln or .vcproj file was not mentioned and checked in. Did you see an update to either of these files via TortoiseHg? If not, make sure to build or save your project after a change like this.
Did you make sure that the Visual Studio Project File or Solution file is being updated and committed?
VS solution contains projects and each project select managed files by metadata(***.vcproj file). It's not the way include all files from root directory.
So, your co-workers can see new added files by in following two ways.
1) share project file(***.vcproj)
2) manually add files in each person's VS instance.