Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ability to suppress MSB3270 at the individual assembly for a specific mismatch. #9695

Open
vsfeedback opened this issue Jan 30, 2024 · 2 comments
Labels
backlog gathering-feedback The issue requires feedback in order to be planned, please comment if the feature is useful for you Priority:3 Work that is nice to have Task: Resolve Assembly References (RAR) triaged

Comments

@vsfeedback
Copy link

vsfeedback commented Jan 30, 2024

This issue has been moved from a ticket on Developer Community.


Currently it is possible to completely suppress the warning

 <ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
        None
    </ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>

This is problematic when C++/CLI is referencing Managed (AnyCPU), using platform specific dll's for the managed assemblies is NOT a solution.

Since this is a non-problem at runtime it would be beneficial to specify

--- Suppress Warning for My.Special.Selection.cll" when it is "AnyCPU"

This would allow other mismatches which may be important to generate warnings but the specific occurances of specific types would be suppressed.


Original Comments

Feedback Bot on 6/27/2022, 09:29 AM:

(private comment, text removed)

@AR-May AR-May added gathering-feedback The issue requires feedback in order to be planned, please comment if the feature is useful for you Task: Resolve Assembly References (RAR) backlog triaged labels Jan 30, 2024
@rokonec rokonec added the Priority:3 Work that is nice to have label Feb 1, 2024
@gerhard17
Copy link

I have a similar problem: Having a special Hosting-Assembly (AnyCPU) which can load and start either a 32- or 64-bit host process (exe). These two host processes are referenced by the Hosting-Assembly, so they are getting copied and the location can be extracted with e.g. typeof(Program32).Assembly.Location or typeof(Program64).Assembly.Location

It would be greatly welcomed to suppress the message for exactly these two host process assemblies.

The current warning is also propagated to other assemblies using the Hosting-Assembly, which I want also to suppress.

@rainersigwald
Copy link
Member

@gerhard17 for your specific scenario, does the actual Hosting-Assembly need to directly reference the host process assemblies? In many such cases those would be invisible to ResolveAssemblyReferences by using <ProjectReference Include="..\x86host\x86host.csproj" ReferenceOutputAssembly="false" /> or similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog gathering-feedback The issue requires feedback in order to be planned, please comment if the feature is useful for you Priority:3 Work that is nice to have Task: Resolve Assembly References (RAR) triaged
Projects
None yet
Development

No branches or pull requests

5 participants