© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago
Memw

Targets not running

So I was testing with msbuild properties and I have a target that's supposed to show a message, but the target doesn't even run, I feel I'm missing something

<Project Sdk="Microsoft.NET.Sdk">

    <PropertyGroup>
        <OutputType>Exe</OutputType>
        <TargetFramework>net8.0</TargetFramework>
        <LangVersion>12</LangVersion>
        <ImplicitUsings>enable</ImplicitUsings>
        <Nullable>enable</Nullable>
    </PropertyGroup>

    <ItemGroup>
        <Reference Include="MemwLib">
            <HintPath>..\MemwLib\bin\AnyCPU_Debug\MemwLib\net7.0\MemwLib.dll</HintPath>
        </Reference>
    </ItemGroup>

    <Target Name="lmfao" AfterTargets="AfterBuild">
        <ItemGroup>
            <Message Text="Hello $(TargetDir)" Importance="High"/>
        </ItemGroup>
    </Target>
</Project>
<Project Sdk="Microsoft.NET.Sdk">

    <PropertyGroup>
        <OutputType>Exe</OutputType>
        <TargetFramework>net8.0</TargetFramework>
        <LangVersion>12</LangVersion>
        <ImplicitUsings>enable</ImplicitUsings>
        <Nullable>enable</Nullable>
    </PropertyGroup>

    <ItemGroup>
        <Reference Include="MemwLib">
            <HintPath>..\MemwLib\bin\AnyCPU_Debug\MemwLib\net7.0\MemwLib.dll</HintPath>
        </Reference>
    </ItemGroup>

    <Target Name="lmfao" AfterTargets="AfterBuild">
        <ItemGroup>
            <Message Text="Hello $(TargetDir)" Importance="High"/>
        </ItemGroup>
    </Target>
</Project>


The target that should run is the "lmfao" one
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Running custom build targets within library user
C#CC# / help
2y ago
Maui - pre build targets iOS
C#CC# / help
11mo ago
❔ Alias in .targets `<Reference` tag
C#CC# / help
3y ago
✅ Benchmarks not running
C#CC# / help
2y ago