Archive for the ‘Visual Studio’ Category
A friend needed the Xml Serializers dll, the one named something like “ClassLibrary1.XmlSerializers.dll”, so he went into the project properties in VS and set “Build > Generate serialization assembly” to “On”. But nothing happened. No XmlSerializers dll was created.
We hunted round for an answer and came across this: Generating an Xml Serialization assembly as part of my build.
After setting the above project property you must go into the project file in your favorite text editor and add this:
just after the line:
You should end up with something like this:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <GenerateSerializationAssemblies>On</GenerateSerializationAssemblies> <SGenUseProxyTypes>false</SGenUseProxyTypes> </PropertyGroup>
Do that for every build configuration where you need the serializer.
Hope that helps.
A fellow developer was using Visual Studio 2010 SP1 to debug a classic ASP application. He attempted to attach to the IIS process, w3wp.exe and received the error message: “Unable to attach to process. A debugger is already attached.”
He is running Windows 7, 32 bit. (But I reproduced the error on Win7 64 bit.)
He is using IIS 7.5.
Yesterday he installed IE 10 32 bit. (Yesterday I installed IE 10 64 bit.)
We looked in Process Explorer but no debugger was running that we could see.
We tried changing the “Attach to” type in the “Attach to Process” dialog, but it had no effect.
We tried all sorts of things but nothing made any difference.
I found this forum article: Visual Studio 2010 debugger already attached classic ASP
I tried debugging the same ASP site by attaching to the IIS process, using VS 2012 and it worked perfectly.
Use VS 2012 or revert from IE 10 for Win7 to IE 9.
My fellow developer is installing VS 2012. (I don’t know why he didn’t do it already – heck, it’s worth it just for that cool Dark Theme.)
I hope that helps anyone hitting this issue.
So I want to add PowerShell automation to my .NET app and according to MSDN (How to Write a Simple Host Application) I have to use the “Browse” feature of the “Add Reference” dialog in Visual Studio. The location for the System.Management.Automation.dll is given as “Windows\assembly\GAC_MSIL\System.Management.Automation”. But that may not always be correct. See my note at the end.
Another, and I think better, way to do it is to open your project file and in the first “<ItemGroup>” section, add:
<Reference Include="System.Management.Automation" />
This worked great for me.
Something to watch out for if you use the “Browse” method and you are using the Powershell 3 CTP: The dll is in a different location:
When I used the “Reference” method, Visual Studio referenced it without me having to do anything more. Now that’s what I call service.
I’ve been able to upgraded NuGet successfully sometimes and other times I’ve had to uninstall and reinstall to make it work. Very annoying.
Today it happened again and looking in the intallation log I saw: “The signature on the update version of ‘NuGet Package Manager’ does not match the signature on the installed version”.
I hunted around and found the solution: Install this VS hotfix – http://bit.ly/vsixcertfix
See “Known Installation Issue” at http://docs.nuget.org/docs/release-notes/nuget-1.8
Thanks to http://www.codeplex.com/site/users/view/pranavkm for the post that led me to this.