Jump to content

Set Microsoft .Net Framework 4.5.2 as default


photo

Recommended Posts

Hi!

You can just open sample in Visual Studio ("Edit in IDE" in SDK Browser") and change target framework in project settings.
This, however, has some pitfalls.

Visual Studio will add app.config into the project, which upon rebuild rewrites file <sample>.exe.config.
For correct sample running add these settings to app.config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
	<runtime>
		<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
	<dependentAssembly>
					<assemblyIdentity name="UnigineSharp_x64d" culture="neutral" publicKeyToken="f6ef6838e040fba0"/>
					<codeBase version="1.0.1.0" href="../../../../../../bin/UnigineSharp_x64d.dll"/>
				</dependentAssembly>
	<dependentAssembly>
					<assemblyIdentity name="UnigineSharp_x86d" culture="neutral" publicKeyToken="f6ef6838e040fba0"/>
					<codeBase version="1.0.1.0" href="../../../../../../bin/UnigineSharp_x86d.dll"/>
				</dependentAssembly>
	<dependentAssembly>
					<assemblyIdentity name="UnigineSharp_x64" culture="neutral" publicKeyToken="f6ef6838e040fba0"/>
					<codeBase version="1.0.1.0" href="../../../../../../bin/UnigineSharp_x64.dll"/>
				</dependentAssembly>
	<dependentAssembly>
					<assemblyIdentity name="UnigineSharp_x86" culture="neutral" publicKeyToken="f6ef6838e040fba0"/>
					<codeBase version="1.0.1.0" href="../../../../../../bin/UnigineSharp_x86.dll"/>
				</dependentAssembly>
	</assemblyBinding>
	</runtime>
</configuration>

 

Or you can just open .csproj file  in text editor and modify this line:

<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>

 

Also, we've noticed that C# sample projects have some wrong debug settings in the SDK.
If sample won't run, replace text in "Command line arguments" for "All Configurations" and "All Platforms" with this:

-data_path ../../../../../../data -data_path ../../data -data_path ./data

We'll fix debug settings in future SDK releases.

Link to comment
×
×
  • Create New...