I happened to be experimenting with a portable class library in .net 4.5.
I had issues when I tried to connect to it through a normal Asp.net MVC project. Hence I wanted to re-convert it into a normal class library, but without deleting the project.
This is how I did it.
Step 1
Open your project file in notepad
Step 2
Locate the following
Step 3
Locate the following and delete it
Now try opening the newly saved .csproj file in Visual studio. You will be prompted to target a .net framework, select the framework you need to target and click ok.
The project will be loaded normally. Now right-click on the project in the solution explorer->Properties. It will show the Output type as Class Library.
I had issues when I tried to connect to it through a normal Asp.net MVC project. Hence I wanted to re-convert it into a normal class library, but without deleting the project.
This is how I did it.
Step 1
Open your project file in notepad
Step 2
Locate the following
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
Replace it with
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Step 3
Locate the following and delete it
Now save your project file. To be safe, save it with a different name<ProjectTypeGuids>....</ProjectTypeGuids>
Now try opening the newly saved .csproj file in Visual studio. You will be prompted to target a .net framework, select the framework you need to target and click ok.
The project will be loaded normally. Now right-click on the project in the solution explorer->Properties. It will show the Output type as Class Library.
No comments:
Post a Comment