I started getting warning messages like ' Could not find schema information for the element 'supportedRuntime'' after adding an app.config file to my project. It seems that Microsoft have not completely specified the 'startup' element in the relevant .xsd file. To fix this: Navigate to the file ' C:\Program Files\Microsoft Visual Studio 10.0\Xml\Schemas\DotNetConfig.xsd'. If the startup element looks like this: <: xs:element name="startup" vs:help="configuration/startup"> Change it to: < xs:element name="startup" vs:help="configuration/startup"> < xs:complexType> < xs:choice minOccurs="1" maxOccurs="1"> < xs:element name="requiredRuntime" vs:help="configuration/startup/requiredRun...
Posts
Showing posts with the label .NET 4
Using Cognex 7.2 with .NET 4
- Get link
- X
- Other Apps
Cognex 7.2 can be used with .NET 4, but it needs a bit of setting up… Right click on the project in Solution Explorer > Add > New Item. Select General > Application Configuration File. On the project properties set the Target framework to ‘.NET Framework 4’. Note – not the client profile version. It should warn you about reloading the project. Click OK and this will update the app.config file with the .NET version. To the app.config file add the attribute: useLegacyV2RuntimeActivationPolicy = " true ". It should now look like this: xml version = " 1.0 " ?> < configuration > < startup useLegacyV2RuntimeActivationPolicy = " true " >< supportedRuntime version = " v4.0 " sku = " .NETFramework,Version=v4.0 " /> startup > configuration > It should now compile OK.