Your project might have an assembly properties file that sets TargetFramework too, clashing with the generated file you show.
This would happen if your converting from an old-style project file to a new .vbproj file.
For this case, remove the extra file in your project.
You can also prevent the build from generating this attribute at build time with this project property
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
-Govert
--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/exceldna/4082c307-d52d-45a6-82ca-82a85d70e108n%40googlegroups.com.
In Visual Studio in the Solution Explorer, if you click the “Show All Files” button, you might see files like “AssemblyInfo.vb”.
Check whether you have a TargetFramework entry in there.

To view this discussion visit https://groups.google.com/d/msgid/exceldna/ddfcd302-5e78-4899-865d-fab5db4258c3n%40googlegroups.com.
When I build, I get the same file in the obj\Debug folder, but no error.
So I think you might have this attribute somewhere in a file that your project incorporates.
Maybe under the Properties folder.
If you can make a small project that has this problem and you can post on GitHub or somewhere, I’d be happy to have a look.
To view this discussion visit https://groups.google.com/d/msgid/exceldna/d68553c6-c164-4909-86bc-b2152a2b39d5n%40googlegroups.com.