Skip to content

Commit

Permalink
ARROW-8505: [Release][C#] "sourcelink test" is failed by Apache.Arrow…
Browse files Browse the repository at this point in the history
…AssemblyInfo.cs

Workaround dotnet/sourcelink#572 by explicitly embedding the AssemblyAttributes file into the pdb.

Closes apache#7040 from eerhardt/FixSourceLinkTest

Lead-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
Co-authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
  • Loading branch information
2 people authored and kszucs committed May 14, 2020
1 parent bc24f2b commit 2f0554d
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 3 deletions.
17 changes: 17 additions & 0 deletions csharp/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<Project>

<!-- Common repo directories -->
Expand Down
29 changes: 29 additions & 0 deletions csharp/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<Project>

<!-- The following works around https://github.com/dotnet/sourcelink/issues/572 -->
<PropertyGroup>
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
</PropertyGroup>
<ItemGroup>
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
<EmbeddedFiles Include="$(TargetFrameworkMonikerAssemblyAttributesPath)"/>
</ItemGroup>

</Project>
19 changes: 18 additions & 1 deletion csharp/test/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<Project>

<Import Project="..\Directory.Build.props" />
Expand All @@ -6,4 +23,4 @@
<IsPackable>false</IsPackable>
</PropertyGroup>

</Project>
</Project>
2 changes: 0 additions & 2 deletions dev/release/rat_exclude_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ csharp/.gitattributes
csharp/dummy.git/*
csharp/src/Apache.Arrow/Flatbuf/*
csharp/Apache.Arrow.sln
csharp/Directory.Build.props
csharp/examples/FluentBuilderExample/FluentBuilderExample.csproj
csharp/examples/Examples.sln
csharp/src/Apache.Arrow/Apache.Arrow.csproj
Expand All @@ -211,7 +210,6 @@ csharp/src/Apache.Arrow/Properties/Resources.resx
csharp/test/Apache.Arrow.Benchmarks/Apache.Arrow.Benchmarks.csproj
csharp/test/Apache.Arrow.Tests/Apache.Arrow.Tests.csproj
csharp/test/Apache.Arrow.Tests/app.config
csharp/test/Directory.Build.props
*.html
*.sgml
*.css
Expand Down

0 comments on commit 2f0554d

Please sign in to comment.