Unable to load Silverlight 3 Project in Visual Studio 2010 - visual-studio-2010

I've been trying to open a Silverlight 3 solution in Visual Studio 2010, but I've been getting the following error:
Unable to read the project file 'ESM.Visualization.csproj'. C:\Code\ESM\ESM.Visualization\ESM.Visualization.csproj(238,3): The imported project "C:\Program Files(x86)\MSBuild\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.CSharp.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on the disk.
I found that I didn't have Silverlight v3.0 but I couldn't find a way to get Silverlight 3.0 on my Visual Studio 2010, especially since I have Silverlight v4.0 already installed.

You must change your *.csproj file manually.
Open it in any text editor, navigate to the line with the incorrect code (number 238, I suppose) and check that it looks so:
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
Then change these lines, set the content of the second element to "v4.0":
<TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>

Related

VS 2019 could not find SDK

I keep getting this error, I am trying to perform the unity MRTK tutorial for hololens 2. I did everything on the first page https://learn.microsoft.com/en-us/windows/mixed-reality/mr-learning-base-02. When I try and run it this error comes up. I have tried to install 10.0.19041.0 through windows but it always kicks to 19041.1 I have installed all the required components in visual studio.
Any help would be appreciated.
Error pic
Installed Vs individual components
Unity Build settings
The problem you met is a bug seemingly caused by vs installer. It happens when Visual Studio is not installed on driver C.
You can see it here:
https://developercommunity2.visualstudio.com/t/HoloLens-2-build-fails-if-Windows-sdk-is/1313568
There are many ways you could do to get through this.
Copy the folder [Windows Kit Root Dir]\10\Extension SDKs\WindowsMobile (For e.g., D:\Windows Kits\10\Extension SDKs\WindowsMobile) to C:\Program Files (x86)\Windows Kits\10\Extension SDKs\. Should solve all of the missing WindowMobile issues.
https://developercommunity.visualstudio.com/t/msb3774-could-not-find-sdk-windowsmobile-version10/402362#T-N474809
Delete the reference to the Mobile SDK in the vxcproj file.
https://stackoverflow.com/a/60600054/9522354
I tried the first method and it worked for me.
I have tried to install 10.0.19041.0 through windows but it always kicks to 19041.1
For how to modify the SDKReference version, you can try following step:
By referring Section 5 of Update your C#/VB projects to use the latest Universal Windows Platform
Right-click your existing project(YourProjectName(Universal Windows)) in solution explorer, then select Unload Project. After the project is unloaded, right-click the project file again and choose to edit the .vcxproj file.
Find "SDKReference" element and change the value of version from "10.0.19041.1" to your version like "10.0.19041.0".
<ItemGroup>
<SDKReference Include="WindowsMobile, Version=10.0.19041.1" />
</ItemGroup>
to
<ItemGroup>
<SDKReference Include="WindowsMobile, Version=10.0.19041.0" />
</ItemGroup>
Besides, since you are using HoloLens2, it is recommended to set the Architecture in the Unity Build Setting window to x64.

3DS Max Plugin Wizard with Visual Studio 2017

I'm trying to set up the 3DS max Plugin wizard with my Visual Studio 2017.
Ofc i followed all the needed instructions, i set up the new absolute path directory, i made all files to be written on and not read only.
I can see the create a 3ds max plugin project in my visual studio, but when i click create projects, it just doesnt do anything and pops up back again to create a project.
I's there anyone out there who knows a possible solve?
Is the 3ds max SDK not compatible with the 2017 version?
With 3ds Max 2019 and Visual Studio Community 2017, these steps worked for me:
From folder <maxsdk>\howto\3dsmaxPluginWizard, open 3dsmaxPluginWizard.vsz in a text editor
Change line starting with Wizard= to Wizard=VsWizard.VsWizardEngine.15.0. This might be the step you were missing.
Change line starting with Param="ABSOLUTE_PATH = to give the full absolute path of the folder <maxsdk>\howto\3dsmaxPluginWizard
Copy 3dsmaxPluginWizard.ico, 3dsmaxPluginWizard.ico and 3dsmaxPluginWizard.vsz to C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\vcprojects
Platform Toolset: After creating the project, make sure to change the setting Configuration Properties->General->Platform Toolset to Visual Studio 2015 (v140) at least for 3ds Max 2018 and 3ds Max 2019. The required Visual Studio versions for each 3ds Max version are listed on the help page here. To prevent this problem in the future, you could update the template by adding the following to \maxsdk\howto\3dsmaxPluginWizard\Templates\1033\root.vcxproj_template and replace v140 with the appropriate value as shown on the help page:
<PropertyGroup Label="Configuration" >
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
That's it! In Visual Studio 2017 select File->New->Project..., then (1) select the 3ds Max Plugin Wizard, enter a Name, Location and Solution name, click OK, then (2) for Plugin Type select any other, I've tested that Utility is working, then (3) for Plugin Details be sure to enter a plugin category and plugin description, which can be any text, then (4) for Plugin Details set paths for root folder and where you want the plugin to live and the install root folder. Project should be created and work fine. It's possible there are bugs with certain plugin types though.
Possible errors:
When creating a project, if you receive an error popup like Unable to read the project file with Name cannot begin with the '3' character, try again and fill all fields in the Project Details page of the wizard with the read absolute paths, like C:\Program Files\Autodesk\3ds Max 2018 SDK\maxsdk and 'C:\Program Files\Autodesk\3ds Max 2018'.
When building, if you receive an error like The imported project "somepath\3dsmax.general.project.settings.props" was not found, open the .vcxproj file in a text editor and fix the value enclosed in <MaxSDK> and </MaxSDK>. It should be the maxsdk location with subfolders for include, lib, samples, etc.
When building, if you receive an error like LINK : fatal error LNK1104: cannot open file 'bmm.lib' then make sure you are building in Release mode. Unless you have a 3ds Max Debug Build provided by the Autodesk Developer Network (ADN), then you will only have Release libraries available under maxsdk\lib\x64.

Setting executable icon in Visual C++ 2010 Express

I'm rather unfamiliar with programming tools in Windows but have been forced to use VC++ 2010 Express for a project recently. We have been working on a piece of software that we didn't start and now we are reaching the finish line. Only problem is that I want to be able to set the executable icon.
Since the project is written mostly in SDL we have set the titlebar icon using the SDL_WM_SetIcon call as recommende on several sites but I still can't find any references to how to set the executable icon. All my google searches has turned up results about Visual Studio 2010 and Visual C++ 2008, neither of which seems appicable.
Since VC++ 2010 Express lacks resource editor but not resource compiler this can be done by manually creating a resource.rc file in the project directory (same as where your .vcxproj files are located), also drop in your .ico version of your icon in the same directory.
In resource.rc add the following line:
IDI_APP ICON "icon.ico"
And add the file, in VC++, to the Resource Files.
Doing this in VC++ should result in something like this to be added to your .vcxproj:
<ItemGroup>
<ResourceCompile Include="resource.rc" />
</ItemGroup>
And to your vcxproj.filters:
<ItemGroup>
<ResourceCompile Include="resource.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
I ran into a similar situation recently with the Express edition.
I came up with a different way to approach this (see gif).
Posting it here in case someone runs into similar problem.

Issue converting project visual studio 2008 to 2010

so I have downloaded a template from the tutorial website http://devmaster.net/posts/introduction-to-c-with-game-development-part-2-project-template
however I have a problem because the template was apparently made in Visual Studio 2008, and I have Visual Studio 2010. When I convert the project I get the error "Unable to start program'C:\c++\Debug\Template.exe' The system cannot find the file specified."
I looked in the original file before conversion and the \Debug\Template.exe file does exist, however after converting the file it gets deleted. I had a few warnings on my conversion and I found this:
"MSB8012: $(TargetPath) ('C:\c++\Debug\Template.exe') does not match the Linker's OutputFile property value 'Template_debug.exe' ('C:\c++\Template_debug.exe') in project configuration 'Debug|Win32'."
Any idea how to fix this?
Any help would be very appreciated
How about creating a fresh project in Visual Studio 2010 and adding the source files and dependencies. Then compile and run, always works!

Can Visual Studio Package built in VS2005 be deployed on VS2010?

I want to deploy a Visual Studio package built using VS2005 deploy on VS2010. I am able to register the package(using regpkg.exe) and I am able to see it as a project template in VS2010. However, the package has a editor page which is displayed as soon as we select this project template which does not get displayed and instead it shows a default editor of VS2010.
I am not sure if this is a problem registering the package or a problem between Visual Studio versions. Can someone help?
We've seen this issue in attempting to launch the editor for existing projects that were originally created in VS2005. We have an editor that handles a specific extension (.svc). In VS2005, the .csproj had:
&ltItemGroup&gt
&ltNone Include="MyServices.svc"&gt
&ltSubType&gtDesigner&lt/SubType&gt
&lt/None&gt
&lt/ItemGroup&gt
Removing the <SubType>Designer</SubType> allowed the expected behavior (double-clicking on the file opened the plug-in) rather than the default editor. Creating a new .svc file in VS2010 resulted in:
&ltItemGroup&gt
&ltContent Include="MyServices.svc" /&gt
&lt/ItemGroup&gt
That always seems to work correctly.

Resources