Nacio
Nacio
CC#
Created by Nacio on 6/18/2023 in #help
❔ Saving current commit information to a file
I'm trying to save the current commit's information using this in the .csproj
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="git log -1 --pretty=%&lt;25&gt;H%&lt;25&gt;n%&lt;25&gt;an%&lt;25&gt;n%&lt;25&gt;ae%&lt;25&gt;n%&lt;25&gt;cn%&lt;25&gt;n%&lt;25&gt;ce%&lt;25&gt;n%&lt;25&gt;cI%&lt;25&gt;n%&lt;25&gt;s &gt; &quot;$(ProjectDir)\CurrentCommit&quot;"/>
</Target>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="git log -1 --pretty=%&lt;25&gt;H%&lt;25&gt;n%&lt;25&gt;an%&lt;25&gt;n%&lt;25&gt;ae%&lt;25&gt;n%&lt;25&gt;cn%&lt;25&gt;n%&lt;25&gt;ce%&lt;25&gt;n%&lt;25&gt;cI%&lt;25&gt;n%&lt;25&gt;s &gt; &quot;$(ProjectDir)\CurrentCommit&quot;"/>
</Target>
but it just keeps saying The system cannot find the file specified., does that mean it can't find the git command or actually the file, or maybe there's a better way to get the commit info? git log -1 --pretty=%H%n%an%n%ae%n%cn%n%ce%n%cI%n%s > ".\CurrentCommit" works just fine when run in a regular terminal Build log: https://pastebin.com/raw/2dpKPdq5
12 replies
CC#
Created by Nacio on 5/20/2023 in #help
✅ EFCore cannot map another entity
I'm trying to move the relation so that the DiscordUser has the UserId (and not User the DiscordUserId) To do that, I've dropped the entire database since idc about it right now, got rid of all migrations but it keeps saying it can't map the User User: https://pastebin.com/ARS3JPiD DiscordUser: https://pastebin.com/mBmUJpP5 DbContext: https://pastebin.com/ybtVHALe Exception: https://pastebin.com/raw/0j8bsks6 Uncommenting the [InverseProperty] also changes the exception to: https://pastebin.com/raw/6z7XswhM
14 replies