[Tests] Local Testing of single Mapster Projects fails for SolutionDir is not always set when building a project directly via dotnet test
@DevTKSS がすでに取り組んでいます。
2026年1月18日 から。
評価
この issue はまだ評価されていません。
説明
I was locally trying around with the DI Package to look into my suggested Idea to enable something like MapsterOptions from appsettings.json.
But testing via dotnet test path/to/csproj fails on the Directory.Build.props file uses SolutionDir which is not or not always set, which causes that Copilot constantly edits the Directory.Build.props with this:
<!--
SolutionDir is not always set when building a project directly (e.g. `dotnet test path/to/csproj`).
Fall back to the key path relative to this props file (src/Mapster/Mapster.snk).
-->
<AssemblyOriginatorKeyFile Condition="Exists('$(SolutionDir)Mapster\\Mapster.snk')">$(SolutionDir)Mapster\Mapster.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile Condition=" '$(AssemblyOriginatorKeyFile)' == '' and Exists('$(MSBuildThisFileDirectory)Mapster\\Mapster.snk')">$(MSBuildThisFileDirectory)Mapster\Mapster.snk</AssemblyOriginatorKeyFile>
Which includes in the .csproj the marked lines:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net10.0;net9.0;net8.0;</TargetFrameworks>
<Description>Dependency Injection supports for Mapster</Description>
<IsPackable>true</IsPackable>
<PackageTags>Mapster;DependencyInjection</PackageTags>
+ <SignAssembly>true</SignAssembly>
+ <AssemblyOriginatorKeyFile>Mapster.DependencyInjection.snk</AssemblyOriginatorKeyFile>
<Version>10.0.0-pre01</Version>
</PropertyGroup>
Since I so far never worked with Signing Assemblys or similar, I don't know for what build/release step we are exactly needing this, assuming just for the Package Creation - Release step, isnt it?
I am quite sure @andrerav or you others @DocSvartz @stagep might have some information and solution? 😁
How do you do this when you others are testing locally?
Is there some kind of trick, except from always building the solution? 😓
Could we have this fixed possibly?
- 主要言語
- C#
- スター
- 5.2k
- フォーク
- 411
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MapsterMapper/Mapster のほかの issue
-
.NET Matrixオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
MapsterMapper/Mapster#1003 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
MapsterMapper/Mapster#1024 · コメント 1 件 ·
-
[Mapster Tool] Add support for global:: to disambiguate type names in generated mappers対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンimprovement
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
MapsterMapper/Mapster#1020 · コメント 5 件 ·
-
Mapster.Tool - PropertySettingBuilder.Map(member, mapFunc, targetPropertyName) method is not working as expected!対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
MapsterMapper/Mapster#1017 · コメント 6 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 57/100
MapsterMapper/Mapster#1007 · コメント 5 件 ·
MapsterMapper/Mapster の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Nimblesite/SharpLsp#468 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
elastic/ecs-dotnet#575 ·
-
alerts bug effort:S P2
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
nightscout/nocturne#2511 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 2 日以内に返信
-
Crash in v3.00オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
arkane-systems/mousejiggler#140 ·