We've added a 3rd party .dll to our project that was causing the warning:
"There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference [...]. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project."
The 3rd party suggested we switch our PlatformTarget to x64 to get rid of the warnings (as the warning suggests). However, upon doing that we have started getting the warning:
Element 'MyControlName' is not a known element. This can occur if there is a compilation error in the Web site, or the web.config file is missing.
The new warning causes issues with intellisense while editing .aspx files. Any ideas why this is occurring?
NOTE: I did find this answer which allows me to suppress the original warnings but that, as I understand it, will always suppress this type of error and we could potentially have a valid error that we would not see.
Adding the following to the project file DOES fix suppress the architecture mismatch errors. However not sure that it's the best fix as it will suppress all (possibly valid) warnings of this type.
<PropertyGroup> <ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch> None </ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch> </PropertyGroup>
NOTE 2: I also tried clearing my schema cache as suggested in this answer as well as VS temp files to fix the "not a known element" error, but to no avail. Only switching back to AnyCPU fixed that warning but then of course the original warning reappeared.