Showing posts with label studio. Show all posts
Showing posts with label studio. Show all posts

Sunday, March 1, 2015

Cant open sqlproj with Visual Studio 2012 Install SQL Server Data Tools

I recently updated to Visual Studio 2012 Ultimate.
When i tried to open an existing SQL Server SQLCLR Project (*.sqlproj), it says that the sqlproj is incompatible with the version I am running.

How-i-fixed-it:
 
 
I installed the SQL Server Data Tools from http://msdn.microsoft.com/en-us/data/tools.aspx.

I found the solution here:

http://stackoverflow.com/questions/11906691/visual-studio-2012-csproj-and-sqlproj

and here:
http://www.comoke.com/index.php/2012/10/visual-studio-2012-database-project-sqlproj-project-type-not-supported/

and here:
http://blog.tentaclesoftware.com/archive/2013/02/11/visual-studio-2010-and-2012-sqlproj-interoperability.aspx
Read more »

How to update Linq to SQL dbml database layout in Visual Studio 2012

I have not been working with the Linq to SQL tool before and had to make some changes to an existing Visual Studio 2012 project. Some new colums were added to a database table and i needed to update the corresponding dbml file in the Visual Studio project.

How-i-fixed-it:
I found the solution here: http://stackoverflow.com/questions/1110171/how-to-update-linq-to-sql-dbml-file

Delete the modified tables from the designer, and drag them back onto the designer surface from the Database Explorer. I have found that, for this to work reliably, you have to:
a. Refresh the database schema in the Database Explorer (right-click, refresh)
b. Save the designer after deleting the tables
c. Save again after dragging the tables back.
Read more »

How to have different local web config settings for a Visual Studio ASP NET C Web TFS Project

Today we started an ASP.NET C# Project under VisualStudio 2012 using Team Foundation Server. We ran into the problem that we need to store some local path settings in the web.config file, but they are different on every developers computer.

How-I-fixed-it:
The solution is, to split the web.config up into several files and just reference the files using the configSource="sectionName.config" Attribute in the corresponding section in the web.config. Dont add these local files to the project, to not get them overwritten by each other.

Heres a sample:

web.config:
<applicationSettings>

<KCM.Properties.Settings configSource="KCM.Properties.Settings.config" />

</applicationSettings>

KCM.Properties.Settings.config:

xml version="1.0" encoding="utf-8" ?>

<KCM.Properties.Settings>

<setting name="DataStoragePath" serializeAs="String">

<value>D:inetpubftproot</value>

</setting>

</KCM.Properties.Settings>

Here i found the right information to get the solution:

http://code-inside.de/blog/2009/11/03/howto-eine-eigene-configsection-schreiben-custom-configsections/

http://blog.andreloker.de/post/2008/06/16/Keep-your-config-clean-with-external-config-files.aspx

http://www.tomot.de/en-us/article/5/asp.net/how-to-use-web.config-transforms-to-replace-appsettings-and-connectionstrings

https://devio.wordpress.com/2013/04/24/handling-web-config-variants-in-source-control-based-solutions/
Read more »

Saturday, February 28, 2015

Installing Visual Studio Tools for Applications 2012 after getting Compatibility mode error

I went to use the developer tab of InfoPath 2013 and it told me that I needed to download the Visual Studio Tools for Applications 2012.  They were even nice enough to include a link!
When I downloaded the file and ran it, I got this error:
Setup Blocked, Windows Program Compatibility mode is on.  Turn it off and then try setup again.
I was not using Compatibility mode, and so this error didnt make sense.
Im running Windows 8.1 with Update 1 and I didnt know if that was related.


I tried everything..  I installed the full Visual Studio 2012 Suite with Office Tools, I installed the VS2012 SDK, and still nothing worked and this wouldnt install.

Here is some of what I found in the log when it fails.

[15EC:11C4][2014-05-28T19:06:50]: Condition CompatibilityMode = 0 evaluates to true.
[15EC:11C4][2014-05-28T19:06:50]: Condition (VersionNT < v6.1) evaluates to false.
[15EC:11C4][2014-05-28T19:06:50]: Condition (NOT netfxfullredist_43_DetectKeyExists) OR (netfxfullredist_43_DetectKey < v4.5) evaluates to false.
[15EC:11C4][2014-05-28T19:06:50]: MUX:  Stop Block: CompatibilityMode : Windows Program Compatibility mode is on. Turn it off and then try Setup again.

The version I was using was published on 4/30/2013 and is here

Turns out that if you rename your download (vsta_setup.exe) to something else, it will not run correctly.  You must leave the name alone when you download it.  For example, if you download it twice and the second download is called vsta_setup (1).exe, executing that file will not work!

Hope this helps!



Read more »