Compiler warning MC3074

Clemens Hoffmann 1 Reputation point
2023-01-04T08:41:01.87+00:00

Hello,
since some time I have a weired issue with compiler warnings in Visual Studio 2022 - 17.4.1
Visual Studio reports some hhundren compiler waarnings of type MC3074.
The code compiles fine but i get this warnings.
What can be the issue

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,616 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Clemens Hoffmann 1 Reputation point
    2023-01-04T08:42:00.293+00:00

    I forgott: We implement a WPF Application and the warnings are issued in XAML


  2. Tianyu Sun-MSFT 27,356 Reputation points Microsoft Vendor
    2023-01-04T14:52:36.627+00:00

    Hello @Clemens Hoffmann ,

    Welcome to Microsoft Q&A forum.

    The warnings of type MC3074 may indicate that the assembly name is empty. Please share us some related codes to check further and confirm the issue. Currently you can check following aspects:

    1. Open .xxproj file => check and make sure that no empty property like <AssemblyName> </AssemblyName> was set(you can try to remove it if it’s empty and is not used).
    2. Check the XAML file, if there are some codes like "xmlns:xxxxx=xxxxxx.xxxxxx;assembly=XXXXXXX", then try to remove "assembly=XXXXXX", or try to specify the assembly.
    3. Make sure that the project and the assembly target the same version of framework(target framework).

    Best Regards,
    Tianyu

    • If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
      Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    0 comments No comments

  3. Clemens Hoffmann 1 Reputation point
    2023-01-05T07:53:51.267+00:00

    Hello,
    this is some code:

    <b:CodeBrowserBase x:Class="SSD.ATLASti.ApplicationModules.Managers.Browsers.CodesBrowser"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:system="clr-namespace:System;assembly=mscorlib"
    xmlns:b="clr-namespace:SSD.ATLASti.ApplicationModules.Managers.Browsers"
    xmlns:conv="clr-namespace:SSD.ATLASti.UI.Controls.Converters;assembly=SSD.ATLASti.UI.Controls"
    xmlns:i18n="http://net.atlasti.com/Schemas/Wpf/I18n"
    xmlns:lists="clr-namespace:SSD.ATLASti.ApplicationModules.Common.Lists;assembly=SSD.ATLASti.ApplicationModules.Common"
    xmlns:emptyStates="clr-namespace:SSD.ATLASti.UI.Controls.EmptyStates;assembly=SSD.ATLASti.UI.Controls"
    xmlns:a="http://net.atlasti.com/Schemas/Wpf"
    xmlns:comm="clr-namespace:SSD.ATLASti.Common;assembly=SSD.ATLASti.Common"
    xmlns:custom="clr-namespace:SSD.ATLASti.UI.Controls.Custom;assembly=SSD.ATLASti.UI.Controls"
    xmlns:services="clr-namespace:SSD.ATLASti.UI.Services;assembly=SSD.ATLASti.UI"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="300"
    KeyboardNavigation.TabNavigation="Continue" >
    <b:CodeBrowserBase.Resources>
    <conv:StringToVisibilityCollapsedConverter x:Key="StringToVisibilityCollapsedConverter" />
    <conv:InverseBooleanToCollapsedVisibilityConverter x:Key="InverseBooleanToVisibilityConverter" />
    </b:CodeBrowserBase.Resources>
    ...
    </b:CodeBrowserBase>

    and warning:

    Severity Code Description Project File Line Suppression State
    Warning MC3074 The tag 'StringToVisibilityCollapsedConverter' does not exist in XML namespace 'clr-namespace:SSD.ATLASti.UI.Controls.Converters;assembly=SSD.ATLASti.UI.Controls'. Line 29 Position 14. SSD.ATLASti.ApplicationModules.Managers C:\Code\Atlas 22 Dev\Application Modules\SSD.ATLASti.ApplicationModules.Managers\Memos\MemosManager.xaml 29

    SSD.ATLASti.ApplicationModules and SSD.ATLASti.UI are different assemblies where SSD.ATLASti.ApplicationModules refers SSD.ATLASti.UI as dependency

    The application has target framework net6.0 but we have one assembly from a core team that has target framework net6.0;net7.0. The core assemby is used on Windows, Mac and Linux /Web) and need to target net7.0 on the Mac