Assembly 'MyDll.dll' must be strong signed in order to be marked as a prerequisite. RRS feed

  • Question

  • Hello Folks,

    Another problem in MsBuild and MyApp.csproj file.

    MyApp.csproj fragment:

        <When Condition=" '$(MyFalseCondition)' == 'True' "> <!-- false condition!!! -->
    			<ProjectReference Include="MyDll.csproj">
    				<Private>False</Private> <!-- still affect deployment -->
    	<When Condition=" '$(MyTrueCondition)' == 'True' ">
    			<Reference Include="MyDll">

    MsBuild 4.0 (from Framework folder) runs with params:

    MsBuid.exe /p:MyFalseCondition=False;MyTrueCondition=True /t:Publish MyApp.csproj

    Build not failed - MyDll.dll sucseffully build or are available in WorkingFolder, MyApp.csproj also build withot errors.

    But on deployment MyDll.dll are marked as Prerequisite(Auto) instead of expected Include(Auto) and couse an error about signing.

    As far as I known this are coused by <Private>False</Private>, but from <When Condition=" '$(MyFalseCondition)' == 'True' "> branch.

    The same <Private>False</Private> in "True" branch should not couse such problem. 

    Any idea about how to suppress picking up wrong elments on deployment? 

    Used on the XP Mode VM with host system Win 7 Pro SP 1, installed Framework 4.0 and Studio 2010 Ent. 

    Sincerely, Highly skilled coding monkey.

    Friday, November 29, 2019 10:40 AM

All replies

  • Hi Andrey Belyakov,

    Sorry for delay in reply.

    According to your description, we recommend you could delete bin and obj folder, they may exist some old dlls from previous compiling. After that, if it lack some files, you could re-add them in specified location, then check if it could work. Please refer more here

    Tips: you could also check if your previous issue could be troubleshoots.

    In addition, we recommend you could use newest version of MSbuild 2019, which is free and open source.

    Any feedback will be expected.

    Best Regards,


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Monday, December 2, 2019 8:36 AM