Opening .scmp file in Visual Studio 2015 opens as XML and not as comparison UI - sql

I'm opening a Database Schema Comparison (.scmp) file and the file opens in Visual Studio as XML. However, the need is for the file to open in the Server Data Tools tab.
I have tried opening from Visual Studio and Windows Explorer.
Using Visual Studio Professional 2015 with Update 3.

Silly me. I didn't notice that SQL Server Data Tools (SSDT) had been corrupted and wasn't showing as installed. Installing SSDT solved the issue.

The .scmp file is a XML file essentially. It is stored in the Schema Comparison folder of the project system by default. When you double click the .scmp file in the Visual Studio, the Select Source/ Target Schema page appears, on which shows the comparison settings and options that you have set. When you click the OK button on that page, SchemaCompare1.scmp file (for example) shows in the edit explorer.
However, you may not open a .scmp file by double-clicking it on the disk. It may be because the .scmp file is used to save comparison settings and options between usage sessions (any combination of a project, database, and .dbschema file), it associates with a solution so you can open it by double-clicking it in the Visual Studio.

Related

Visual Studio installer extension output

I am using Microsoft Visual Studio Installer Projects to make a setup file for my C# app and when I install my app it says:
Failed to update database because the database is read-only
Here is screenshot of my database in Microsoft SQL Management Studio that shows read-only is false.
Here is screenshot of my database file in installer that shows read-only is false.
Yet after installing my app I get error above.
Any idea?
Solved
While comments above were helpful but easiest solution for me that didn't require lots of editing and coding was to change Application Folder path to outside of Program Files (86) folder something like this
C:\[Manufacturer]\[ProductName]
Here is screenshot of where to change that path and everything works fine now
Now it will install on path like C:\My_Company\App_Name where there is no permission restrict for system to access database file.

Is there a way for using SFTP tool for Visual Studio 2017?

I am looking for a tool which helps me to see the folders of a server in Visual Studio 2017 without doing this outside the IDE, actually Notepad++ with the NppFTP plugin can do this and i am taking this as an example, basically you can open a file from the server, edit and upload it automatically upon it is saved.
Thank you
You can install SFTP in visual code 2017 by going to extension and type SFTP then installing it. to use the sftp just right click the file and click upload or download base on your needed.
PS:after installing it, place the json file inside your core project. set the hostname, username and password.

How to make .exe setup in visual studio 2010 including excel template files

I have developed a tool that will extract data from xml file and drop in formatted excel file.
For this I have 3 types of formatted excel files.
so my question is that whenever I m building .exe file, and try to install this file on another (user's) machine, it will not find that excel files.
and my code give me an error.
How can I include that excel files with .exe setup?
so that I do not need to give that files separately.
I m using Visual studio 2010 express
thanks in advanced.
try to compile your code with Advanced Installer
Here are a couple of options.
1) With respect to a setup tool, Microsoft depreciated their own Setup projects and started including Install Shield Limited Edition. This link should help if you want to check that out: InstallShield Limited Edition is available for download in Visual Studio 2010 I tried it for a few projects and found it ok. It does about as much as the prior Microsoft Setup projects.
2) A less conventional option may be to package the excel templates into your exe as a resource file and then write them to the file system when you run the first time. To do this...
In VS, open My Project and click the resources page on the left.
Click the Resources page and used the Add Resource item in the toolbar to add an existing item. Select your excel file and repeat this for each file.
In your code you can save the resource to disk with code like this:
My.Computer.FileSystem.WriteAllBytes("excel filename.xlsx", My.Resources.ExcelFile1, False)
This option will understandably make your exe larger.

Entity Framework in Visual Studio 2013 library not found

I get a rather unusual error in Visual Studio 2013 in Visual Basic when trying to work with Entity Framework. This doesn't matter whether I work with an existing project or create a new one. It started to happen when I changed to a new PC with Win 8.1.
I create a new model using the wizard from a database. It creates the diagram very nicely. However, I get an compilation error telling the library EntityFramework.dll doesn't exist. However, the only thing is that the path to EntityFramework.dll is wrong (Looks like: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\..\IDE\EntityFramework.dll). The address, however, would be D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE. Where would I change that value?
Ueli
Apparently when reinstalling Visual Studio to a different drive the %VS120COMNTOOLS% environment variable is not updated correctly and points to the folder on the drive where VS was originally installed. The template for generating DDL SQL is using the %VS120COMNTOOLS% environment variable to find assemblies it needs to generate the code. Since the variable is pointing to a folder that no longer contains the necessary files the T4 template transformation fails.
Troubleshooting:
Open the developer command prompt for VS2013
set the variable manually to point to the correct location (e.g.
set VS120COMNTOOLS="D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\")
start VS from the command prompt by executing devenv
verify if things now work
(Note that if you follow the above steps to set the variable it will only work for VS instances started from this command prompt.)
If the above works go to the computer properties (e.g. in Win 8/Win 8.1 type "This PC" in the search window), right click on the icon and select "Properties", go to the "Advanced" tab and click the "Environment Variables" button, then in the "System variables" window find the VS120COMNTOOLS variable, double click (or click the "Edit" button) and fix the variable so that it points to the right folder.
Don't forget the last backslash after Tools... C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools <---- will not work, but... C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\ <--- will work
It might look funny but I encounter the same issue (with windows 8.1) but none of the suggested methods worked for me!!
I checked my environment variables it had the correct path but when I tested it with explorer (typed %VS120COMNTOOLS% in explorer's address bar) it does not showed up!! Rather it said
"windows cannot find %VS120COMNTOOLS% make sure you typed the name correctly"
So what I did was I just deleted the variable and recreated it with the exact same path
and after rebuild the error gone!!!
So if you guys have the same issue give it a go
In my case, it was a permission issue and not related to the environment variable file path as the path was correct in my case.
So what I did is added permissions to my current user on the whole visual studio installation folder and then launched Visual Studio as administrator. I re-generated my Model and it worked!
I had this problem with VS2013 on Windows 8.1. I solved the problem by copying
EntityFramework.dll and Microsoft.Data.Entity.Design.dll
from C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE
to C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools
The files are in both locations and now everything works fine.
I had to delete my DB Entity Model and start over again to get things working.
It's probably just an MS coding error making VS2013 look in the wrong place.
I had this problem with VS2013 on Windows Server 2012R2. Two drives (C and D). I tried repairing and uninstall-reinstall but that didn't fix anything. It was hacky but I got it to work.
First I changed the system variables to go from D to C. To do this, go to Control Panel --> System and Security --> System. On the left hand side you will see Advanced System Settings. On the bottom of the Advanced tab you see Environment Variables. I had to edit VS120COMNTOOLS to C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools. It previously was D:\Program Files\Microsoft Visual Studio 12.0\Common7\Tools.
Then I copied the EntityFramework.dll and Microsoft.Data.Entity.Design.dll from C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE to C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\IDE. If the IDE folder doesn't exist then create one. That is what I had to do. Seems so strange but it works!
I had to delete the current edmx in my project, readd it, and restart VS. Such a wierd problem and took me quite a while to piece together multiple stackoverflow articles to get the whole problem solved.
The following path of %VS120COMNTOOLS% is working for me:
set VS120COMNTOOLS="D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\"
I also faced the same issue. I have my VS2012 at "D:\Program Files (x86)\".
I tried to set the common folder for VS using the following set command from VS2012 command Prompt.
set VS120COMN="D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7"
This resolved the issue for me.

Where to get MonoTools for Visual Studio 2010/2012 plug-in. No luck with their web site as it is down

I have been trying to get the MonoTools for Visual Studio from their web site (mono-tools.com). But with no luck. Where to get MonoTools for Visual Studio 2010/2012 plug-in?
Aditya.
You can easily modify the MonoTools installer to work with VS2012. .vsix files are ZIP files. In the root of the zip, you'll see a file named extension.vsixmanifest, which lists the versions of Visual Studio that are supported by the extension.
Basically,
Download the MonoTools package
Rename it to have a .zip extension
Right-click and select "open" - you don't want to extract the file, just open the archive using the built-in Windows mechanism
Copy extension.vsixmanifest anywhere - say, to your desktop.
Open it up in a text editor (I love Notepad++, EMACS is also pretty awesome under OSX.)
Change the SupportedProducts key to the following:
<SupportedProducts>
<VisualStudio Version="10.0">
<Edition>VSTS</Edition>
<Edition>VSTD</Edition>
<Edition>Pro</Edition>
</VisualStudio>
<VisualStudio Version="11.0">
<Edition>VSTS</Edition>
<Edition>VSTD</Edition>
<Edition>Pro</Edition>
</VisualStudio>
</SupportedProducts>
Copy the modified file back into the archive.
Rename it from .zip to .vsix
Run it. The Visual Studio Version Selector should appear and let you pick VS2012.
If the Mono menu item doesn't appear after restarting VS, you may need to run
devenv /setup
from a VS command prompt (or, from c:\program files (x86)\microsoft visual studio 11\common7\ide).
This works for just about any VS2010 extension.
That was a former product from Novell, and it is no longer offered or developed.
Xamarin doesn't offer it either.
can get it from here: http://mono-tools.com/
free if you do their survey
but i don't see a vs2012 version
It costs at minimum $999.00 - https://store.xamarin.com/ and is included as part of Mono for Android. Here's a screenshot of what it looks like after it's installed.
There is also a training course on this from PluralSight -- http://www.pluralsight-training.net/microsoft/Courses/TableOfContents/android-intro