pawotter / mastodon-api-cs

The Mastodon API Client Library for C#
https://github.com/tootsuite/mastodon
MIT License
27 stars 4 forks source link

VS 2017 does strange things to the Mastodon.API.Tests.csproj file #25

Closed toryalsip closed 7 years ago

toryalsip commented 7 years ago

@53ningen I've noticed this will remove the ItemGroup listing folders and then add some additional things at the bottom. See the example below. I'm concerned that this would not play nice with Xamarin Studio. If you can confirm whether or not that this the case I'd be grateful. Thank you.

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{080A956E-17EC-444C-9716-205E11D7B4D9}</ProjectGuid>
    <OutputType>Library</OutputType>
    <RootNamespace>Mastodon.API.Tests</RootNamespace>
    <AssemblyName>Mastodon.API.Tests</AssemblyName>
    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    <ReleaseVersion>0.2.0</ReleaseVersion>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug</OutputPath>
    <DefineConstants>DEBUG;</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <Optimize>true</Optimize>
    <OutputPath>bin\Release</OutputPath>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="nunit.framework">
      <HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
    </Reference>
    <Reference Include="Newtonsoft.Json">
      <HintPath>..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
    </Reference>
    <Reference Include="System.Net.Http" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Entities\InstanceTest.cs" />
    <Compile Include="Entities\AccountTest.cs" />
    <Compile Include="Entities\TagTest.cs" />
    <Compile Include="Entities\AttachmentTest.cs" />
    <Compile Include="Entities\CardTest.cs" />
    <Compile Include="Entities\ErrorTest.cs" />
    <Compile Include="Entities\MentionTest.cs" />
    <Compile Include="Entities\ApplicationTest.cs" />
    <Compile Include="Entities\RelationshipTest.cs" />
    <Compile Include="Entities\ReportTest.cs" />
    <Compile Include="Entities\StatusTest.cs" />
    <Compile Include="MastodonApiTest.cs" />
    <Compile Include="Entities\TokenTest.cs" />
    <Compile Include="ExtensionsTest.cs" />
    <Compile Include="Entities\MastodonAppTest.cs" />
    <Compile Include="Entities\OAuthAccessScopeTest.cs" />
    <Compile Include="Entities\StatusVisibilityTest.cs" />
    <Compile Include="ApiClientBaseTest.cs" />
    <Compile Include="TestUtils.cs" />
    <Compile Include="LinkTest.cs" />
  </ItemGroup>
  <ItemGroup>
    <None Include="packages.config" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\Mastodon.API\Mastodon.API.csproj">
      <Project>{BBF68570-AF0D-4440-85C4-0094876580BF}</Project>
      <Name>Mastodon.API</Name>
    </ProjectReference>
  </ItemGroup>
  <ItemGroup />
  <ItemGroup>
    <EmbeddedResource Include="Resources\get_account.json" />
    <EmbeddedResource Include="Resources\get_instance.json" />
    <EmbeddedResource Include="Resources\get_tag.json" />
    <EmbeddedResource Include="Resources\get_attachment.json" />
    <EmbeddedResource Include="Resources\get_card.json" />
    <EmbeddedResource Include="Resources\get_error.json" />
    <EmbeddedResource Include="Resources\get_mention.json" />
    <EmbeddedResource Include="Resources\get_application.json" />
    <EmbeddedResource Include="Resources\get_relationship.json" />
    <EmbeddedResource Include="Resources\get_report.json" />
    <EmbeddedResource Include="Resources\get_status.json" />
    <EmbeddedResource Include="Resources\get_token.json" />
    <EmbeddedResource Include="Resources\get_mastodon_app.json" />
    <EmbeddedResource Include="Resources\next_and_prev_link" />
    <EmbeddedResource Include="Resources\prev_link" />
    <EmbeddedResource Include="Resources\next_link" />
  </ItemGroup>
  <ItemGroup>
    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
53ningen commented 7 years ago

now I am using Visual Studio 2017 for Mac and I could not reproduce it.

2017-05-24 0 06 16
% git diff HEAD~1 HEAD                                                                                                                                                                         (git)-[test]
diff --git a/Mastodon.API.Tests/EmptyClass.cs b/Mastodon.API.Tests/EmptyClass.cs
new file mode 100644
index 0000000..2463e7f
--- /dev/null
+++ b/Mastodon.API.Tests/EmptyClass.cs
@@ -0,0 +1,10 @@
+<U+FEFF>using System;
+namespace Mastodon.API.Tests
+{
+    public class EmptyClass
+    {
+        public EmptyClass()
+        {
+        }
+    }
+}
diff --git a/Mastodon.API.Tests/Mastodon.API.Tests.csproj b/Mastodon.API.Tests/Mastodon.API.Tests.csproj
index 5b21d0f..83ced50 100644
--- a/Mastodon.API.Tests/Mastodon.API.Tests.csproj
+++ b/Mastodon.API.Tests/Mastodon.API.Tests.csproj
@@ -58,6 +58,7 @@
     <Compile Include="Mocks\MockHttpMessageHandler.cs" />
     <Compile Include="TestUtils.cs" />
     <Compile Include="LinkTest.cs" />
+    <Compile Include="EmptyClass.cs" />^M
   </ItemGroup>
   <ItemGroup>
     <None Include="packages.config" />

Would you try it again?