.NET 4.5 Beta DbGeography NotImplementedException

DefaultSpatialServices in Entity Framework are using SqlGeography and SqlGeometry types as backing types. These two types live in Microsoft.SqlServer.Types.dll assembly that is not part of the .NET Framework. The exception is thrown when EF cannot find these types (the exception could be more helpful…). When you install Visual Studio it will install localdb on your … Read more

Moq & Interop Types: works in VS2012, fails in VS2010?

Edit : It works for me when I try it in Visual Studio 2012 and target .Net 4.0, only using the .Net PIA’s not the COM ref. Same solution doesn’t work in VS2010. VS2010 loads version’s 10.0.30319.1 of the Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll’s and VS2012 loads version’s 11.0.50727.1. You can see the different version’s in the Modules window. … Read more

How can I invoke my MSBuild Target when msbuild.exe starts and when it ends

To execute a solution-wide Before and After targets, you would create two MSBuild project files named “after.<SolutionName>.sln.targets” and “before.<SolutionName>.sln.targets” in the same folder as your solution. To do this on all solutions, you would drop your custom solution-level after targets files into the path $(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\SolutionFile\ImportBefore\ or $(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\SolutionFile\ImportAfter. When those solutions are built, it will import … Read more

Visual Studio 2013: CL.exe exited with code -1073741515

When trying to compile a project with Platform Toolset to Windows7.1SDK… That’s not a valid selection in a “fresh” install for VS2013. Not very clear what you’ve been doing, it certainly isn’t “fresh” anymore. Do treat Regedit.exe as a loaded weapon, the registry key set that configures VS has been getting pretty doggone convoluted as … Read more

debugging with visual studio using redirected standard input

This is a supported debugging scenario. You do have to make sure that the debugger can find the file. Leave the Command setting at $(TargetPath). A possible value for the Command Arguments setting is: < “$(ProjectDir)test.txt” if the input file “test.txt” is located in the project directory. Or type the full path of the file … Read more

How to execute a PowerShell script only before a web deploy Publish task in VS 2012?

It depends on how you define before but below is one technique. When you create a publish profile with VS2012 it will create you a .pubxml file in the Properties\PublishProfiles folder (My Project\PublishProfiles for VB). These are MSBuild files and you can edit them to customize the publish process. In your case you can inject … Read more