8000 MonoDevelop.VersionControl.Git.csproj: get it compile · dotdevelop/dotdevelop@bba6c11 · GitHub
[go: up one dir, main page]

Skip to content

Commit bba6c11

Browse files
committed
MonoDevelop.VersionControl.Git.csproj: get it compile
1 parent 3d35e7c commit bba6c11

File tree

7 files changed

+186
-178
lines changed

7 files changed

+186
-178
lines changed

main/Main.sln.DotSettings

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,8 @@
1111
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_BEFORE_METHOD_PARENTHESES/@EntryValue">True</s:Boolean>
1212
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateConstants/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb"&gt;&lt;ExtraRule Prefix="" Suffix="" Style="AA_BB" /&gt;&lt;/Policy&gt;</s:String>
1313
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
14-
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String></wpf:ResourceDictionary>
14+
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
15+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
16+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
17+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
18+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
using System;
2+
using System.Runtime.Serialization;
3+
using LibGit2Sharp.Core;
4+
5+
namespace LibGit2Sharp
6+
{
7+
/// <summary>
8+
/// The exception that is thrown when an operation which requires an
9+
/// authentication fails.
10+
/// </summary>
11+
[Serializable]
12+
public class AuthenticationException : LibGit2SharpException
13+
{
14+
/// <summary>
15+
/// Initializes a new instance of the <see cref="LibGit2Sharp.AuthenticationException"/> class.
16+
/// </summary>
17+
public AuthenticationException()
18+
{
19+
}
20+
21+
/// <summary>
22+
/// Initializes a new instance of the <see cref="LibGit2Sharp.AuthenticationException"/> class with a specified error message.
23+
/// </summary>
24+
/// <param name="message">A message that describes the error.</param>
25+
public AuthenticationException(string message)
26+
: base(message)
27+
{
28+
}
29+
30+
/// <summary>
31+
/// Initializes a new instance of the <see cref="LibGit2Sharp.AuthenticationException"/> class with a specified error message and a reference to the inner exception that is the cause of this exception.
32+
/// </summary>
33+
/// <param name="message">The error message that explains the reason for the exception.</param>
34+
/// <param name="innerException">The exception that is the cause of the current exception. If the <paramref name="innerException"/> parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception.</param>
35+
public AuthenticationException(string message, Exception innerException)
36+
: base(message, innerException)
37+
{
38+
}
39+
40+
/// <summary>
41+
/// Initializes a new instance of the <see cref="LibGit2Sharp.AuthenticationException"/> class with a serialized data.
42+
/// </summary>
43+
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
44+
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual information about the source or destination.</param>
45+
protected AuthenticationException(SerializationInfo info, StreamingContext context)
46+
: base(info, context)
47+
{
48+
}
49+
50+
}
51+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
using System;
2+
using LibGit2Sharp.Core;
3+
4+
namespace LibGit2Sharp
5+
{
6+
/// <summary>
7+
/// Class that holds SSH username with key credentials for remote repository access.
8+
/// </summary>
9+
public sealed class SshUserKeyCredentials : Credentials
10+
{
11+
/// <summary>
12+
/// Callback to acquire a credential object.
13+
/// </summary>
14+
/// <param name="cred">The newly created credential object.</param>
15+
/// <returns>0 for success, &lt; 0 to indicate an error, &gt; 0 to indicate no credential was acquired.</returns>
16+
protected override int GitCredentialHandler(out IntPtr cred)
17+
{
18+
if (!GlobalSettings.Version.Features.HasFlag(BuiltInFeatures.Ssh))
19+
{
20+
throw new InvalidOperationException("LibGit2 was not built with SSH support.");
21+
}
22+
23+
if (Username == null)
24+
{
25+
throw new InvalidOperationException("SshUserKeyCredentials contains a null Username.");
26+
}
27+
28+
if (Passphrase == null)
29+
{
30+
throw new InvalidOperationException("SshUserKeyCredentials contains a null Passphrase.");
31+
}
32+
33+
if (PublicKey == null)
34+
{
35+
throw new InvalidOperationException("SshUserKeyCredentials contains a null PublicKey.");
36+
}
37+
38+
if (PrivateKey == null)
39+
{
40+
throw new InvalidOperationException("SshUserKeyCredentials contains a null PrivateKey.");
41+
}
42+
43+
throw new NotSupportedException();
44+
}
45+
46+
/// <summary>
47+
/// Username for SSH authentication.
48+
/// </summary>
49+
public string Username { get; set; }
50+
51+
/// <summary>
52+
/// Public key file location for SSH authentication.
53+
/// </summary>
54+
public string PublicKey { get; set; }
55+
56+
/// <summary>
57+
/// Private key file location for SSH authentication.
58+
/// </summary>
59+
public string PrivateKey { get; set; }
60+
61+
/// <summary>
62+
/// Passphrase for SSH authentication.
63+
/// </summary>
64+
public string Passphrase { get; set; }
65+
}
66+
}
Lines changed: 18 additions & 141 deletions
Original file line numberDiff line numberDiff line change
@@ -1,157 +1,34 @@
1-
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="..\..\..\..\MonoDevelop.props" />
33
<Import Project="$(ReferencesGtk)" />
44
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
5+
<TargetFramework>$(MDTargetFramework)</TargetFramework>
76
<ProjectGuid>{0413DB7D-8B35-423F-9752-D75C9225E7DE}</ProjectGuid>
8-
<TargetFrameworkVersion>$(MDFrameworkVersion)</TargetFrameworkVersion>
97
<OutputPath>..\..\..\..\build\AddIns\VersionControl</OutputPath>
8+
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
9+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
10+
<DefineConstants>$(DefineConstants);NoSshUserKeyCredentials</DefineConstants>
1011
</PropertyGroup>
11-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
12-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
13-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugMac|AnyCPU' " />
14-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugGnome|AnyCPU' " />
< E377 /td>
15-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugWin32|AnyCPU' " />
16-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseWin32|AnyCPU' " />
17-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseMac|AnyCPU' " />
18-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseGnome|AnyCPU' " />
1912
<ItemGroup>
20-
<Reference Include="System" />
21-
<Reference Include="System.Core" />
22-
<Reference Include="System.Net.Http" />
23-
</ItemGroup>
24-
<ItemGroup>
25-
<Compile Include="AssemblyInfo.cs" />
26-
<Compile Include="MonoDevelop.VersionControl.Git\GitClient.cs" />
27-
<Compile Include="MonoDevelop.VersionControl.Git\GitVersionControl.cs" />
28-
<Compile Include="MonoDevelop.VersionControl.Git\GitRepository.cs" />
29-
<Compile Include="MonoDevelop.VersionControl.Git\Commands.cs" />
30-
<Compile Include="MonoDevelop.VersionControl.Git\PushDialog.cs" />
31-
<Compile Include="MonoDevelop.VersionControl.Git\GitNodeBuilderExtension.cs" />
32-
<Compile Include="MonoDevelop.VersionControl.Git\GitService.cs" />
33-
<Compile Include="MonoDevelop.VersionControl.Git\UserInfoConflictDialog.cs" />
34-
<Compile Include="MonoDevelop.VersionControl.Git\ConflictResolutionDialog.cs" />
35-
<Compile Include="MonoDevelop.VersionControl.Git\GitConfigurationDialog.cs" />
36-
<Compile Include="MonoDevelop.VersionControl.Git\EditBranchDialog.cs" />
37-
<Compile Include="MonoDevelop.VersionControl.Git\EditRemoteDialog.cs" />
38-
<Compile Include="MonoDevelop.VersionControl.Git\MergeDialog.cs" />
39-
<Compile Include="MonoDevelop.VersionControl.Git\Stash.cs" />
40-
<Compile Include="MonoDevelop.VersionControl.Git\GitUtil.cs" />
41-
<Compile Include="MonoDevelop.VersionControl.Git\CredentialsDialog.cs" />
42-
<Compile Include="MonoDevelop.VersionControl.Git\GitCredentials.cs" />
43-
<Compile Include="MonoDevelop.VersionControl.Git\GitOptionsPanelWidget.cs" />
44-
<Compile Include="MonoDevelop.VersionControl.Git\GitOptionsPanel.cs" />
45-
<Compile Include="MonoDevelop.VersionControl.Git\StashManagerDialog.cs" />
46-
<Compile Include="MonoDevelop.VersionControl.Git\NewStashDialog.cs" />
47-
<Compile Include="MonoDevelop.VersionControl.Git\GitCommitDialogExtensionWidget.cs" />
48-
<Compile Include="MonoDevelop.VersionControl.Git\GitCommitDialogExtension.cs" />
49-
<Compile Include="MonoDevelop.VersionControl.Git\UserGitConfigDialog.cs" />
50-
<Compile Include="MonoDevelop.VersionControl.Git\GitSelectRevisionDialog.cs" />
51-
<Compile Include="AddinInfo.cs" />
52-
<Compile Include="MonoDevelop.VersionControl.Git\ProjectTemplateHandler.cs" />
53-
<Compile Include="MonoDevelop.VersionControl.Git\TfsSmartSubtransport.cs" />
54-
<Compile Include="Gui\MonoDevelop.VersionControl.Git.ConflictResolutionDialog.cs" />
55-
<Compile Include="Gui\MonoDevelop.VersionControl.Git.CredentialsDialog.cs" />
56-
<Compile Include="Gui\MonoDevelop.VersionControl.Git.EditBranchDialog.cs" />
57-
<Compile Include="Gui\MonoDevelop.VersionControl.Git.EditRemoteDialog.cs" />
58-
<Compile Include="Gui\MonoDevelop.VersionControl.Git.GitCommitDialogExtensionWidget.cs" />
59-
<Compile Include="Gui\MonoDevelop.VersionControl.Git.GitConfigurationDialog.cs" />
60-
<Compile Include="Gui\MonoDevelop.VersionControl.Git.GitOptionsPanelWidget.cs" />
61-
<Compile Include="Gui\MonoDevelop.VersionControl.Git.MergeDialog.cs" />
62-
<Compile Include="Gui\MonoDevelop.VersionControl.Git.NewStashDialog.cs" />
63-
<Compile Include="Gui\MonoDevelop.VersionControl.Git.PushDialog.cs" />
64-
<Compile Include="Gui\MonoDevelop.VersionControl.Git.StashManagerDialog.cs" />
65-
<Compile Include="Gui\MonoDevelop.VersionControl.Git.UserGitConfigDialog.cs" />
66-
<Compile Include="Gui\MonoDevelop.VersionControl.Git.UserInfoConflictDialog.cs" />
67-
<Compile Include="MonoDevelop.VersionControl.Git\IGitCredentialsProvider.cs" />
68-
<Compile Include="MonoDevelop.VersionControl.Git\XwtCredentialsDialog.cs" />
69-
</ItemGroup>
70-
<ItemGroup>
71-
<ProjectReference Include="..\..\..\core\MonoDevelop.Core\MonoDevelop.Core.csproj">
72-
<Project>{7525BB88-6142-4A26-93B9-A30C6983390A}</Project>
73-
<Name>MonoDevelop.Core</Name>
74-
<Private>False</Private>
75-
</ProjectReference>
76-
<ProjectReference Include="..\..\..\core\MonoDevelop.Ide\MonoDevelop.Ide.csproj">
77-
<Project>{27096E7F-C91C-4AC6-B289-6897A701DF21}</Project>
78-
<Name>MonoDevelop.Ide</Name>
79-
<Private>False</Private>
80-
</ProjectReference>
81-
<ProjectReference Include="..\MonoDevelop.VersionControl\MonoDevelop.VersionControl.csproj">
82-
<Project>{19DE0F35-D204-4FD8-A553-A19ECE05E24D}</Project>
83-
<Name>MonoDevelop.VersionControl</Name>
84-
<Private>False</Private>
85-
</ProjectReference>
86-
<ProjectReference Include="..\..\..\..\external\xwt\Xwt\Xwt.csproj">
87-
<Project>{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}</Project>
88-
<Name>Xwt</Name>
89-
<Private>False</Private>
90-
</ProjectReference>
91-
<ProjectReference Include="..\..\..\..\external\mono-addins\Mono.Addins\Mono.Addins.csproj">
92-
<Project>{91DD5A2D-9FE3-4C3C-9253-876141874DAD}</Project>
93-
<Name>Mono.Addins</Name>
94-
<Private>False</Private>
95-
</ProjectReference>
96-
<ProjectReference Include="..\..\..\..\external\libgit2sharp\LibGit2Sharp\LibGit2Sharp.csproj">
97-
<Project>{EE6ED99F-CB12-4683-B055-D28FC7357A34}</Project>
98-
<Name>LibGit2Sharp</Name>
99-
</ProjectReference>
100-
<ProjectReference Include="..\..\..\..\external\nrefactory\ICSharpCode.NRefactory\ICSharpCode.NRefactory.csproj">
101-
<Project>{3B2A5653-EC97-4001-BB9B-D90F1AF2C371}</Project>
102-
<Name>ICSharpCode.NRefactory</Name>
103-
<Private>False</Private>
104-
</ProjectReference>
105-
<ProjectReference Include="..\..\MonoDevelop.SourceEditor2\MonoDevelop.SourceEditor.csproj">
106-
<Project>{F8F92AA4-A376-4679-A9D4-60E7B7FBF477}</Project>
107-
<Name>MonoDevelop.SourceEditor</Name>
108-
<Private>False</Private>
109-
</ProjectReference>
110-
</ItemGroup>
111-
<ItemGroup>
112-
<EmbeddedResource Include="MonoDevelop.VersionControl.Git.addin.xml" />
13+
<ProjectReference Include="..\..\..\core\MonoDevelop.Core\MonoDevelop.Core.csproj" />
14+
<ProjectReference Include="..\..\..\core\MonoDevelop.Ide\MonoDevelop.Ide.csproj" />
15+
<ProjectReference Include="..\MonoDevelop.VersionControl\MonoDevelop.VersionControl.csproj" />
16+
<ProjectReference Include="..\..\..\..\external\xwt\Xwt\Xwt.csproj" />
17+
<ProjectReference Include="..\..\..\..\external\mono-addins\Mono.Addins\Mono.Addins.csproj" />
18+
<ProjectReference Include="..\..\..\..\external\nrefactory\ICSharpCode.NRefactory\ICSharpCode.NRefactory.csproj" />
19+
<ProjectReference Include="..\..\MonoDevelop.SourceEditor2\MonoDevelop.SourceEditor.csproj" />
11320
</ItemGroup>
11421
<ItemGroup Condition=" '$(Configuration)' == 'DebugWin32' OR '$(Configuration)' == 'ReleaseWin32' ">
11522
<EmbeddedResource Include="MonoDevelop.VersionControl.Git.Win32.addin.xml" />
11623
</ItemGroup>
11724
<ItemGroup>
118-
<None Include="GitIgnore.txt">
119-
<Gettext-ScanForTranslations>False</Gettext-ScanForTranslations>
120-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
121-
</None>
122-
<None Include="..\..\..\..\external\libgit-binary\libgit2.license.txt">
123-
<Link>libgit2.license.txt</Link>
124-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
125-
</None>
126-
<None Include="..\..\..\..\external\libgit-binary\libssh2.license.txt">
127-
<Link>libssh2.license.txt</Link>
128-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
129-
</None>
130-
<IncludeCopyLocal Include="LibGit2Sharp.dll" />
25+
<InternalsVisibleTo Include="MonoDevelop.VersionControl.Git.Tests" />
13126
</ItemGroup>
13227
<ItemGroup>
133< E545 /td>-
<InternalsVisibleTo Include="MonoDevelop.VersionControl.Git.Tests" />
28+
<PackageReference Include="LibGit2Sharp" Version="0.27.0-preview-0096" />
29+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net472" Version="1.0.0">
30+
<PrivateAssets>all</PrivateAssets>
31+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
32+
</PackageReference>
13433
</ItemGroup>
135-
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
136-
<Choose>
137-
<When Condition=" '$(Configuration)' == 'DebugMac' OR '$(Configuration)' == 'ReleaseMac' ">
138-
<ItemGroup>
139-
<NativeBinaries Include="..\..\..\..\external\libgit-binary\mac\*.dylib" />
140-
</ItemGroup>
141-
</When>
142-
<When Condition=" '$(Configuration)' == 'DebugWin32' OR '$(Configuration)' == 'ReleaseWin32' ">
143-
<ItemGroup>
144-
<NativeBinaries Include="..\..\..\..\external\libgit-binary\windows\*.*" />
145-
</ItemGroup>
146-
</When>
147-
</Choose>
148-
<Target Name="BeforeBuild">
149-
<Exec Command="bash build_libgit2.sh" Condition=" '$(Configuration)' == 'DebugGnome' OR '$(Configuration)' == 'ReleaseGnome' " />
150-
</Target>
151-
<Target Name="AfterBuild">
152-
<ItemGroup Condition=" '$(Configuration)' == 'DebugGnome' OR '$(Configuration)' == 'ReleaseGnome' ">
153-
<NativeBinaries Include="..\..\..\..\external\libgit2\build\*.so*" />
154-
</ItemGroup>
155-
<Copy SourceFiles="@(NativeBinaries)" DestinationFolder="$(OutputPath)\" SkipUnchangedFiles="true" />
156-
</Target>
15734
</Project>

0 commit comments

Comments
 (0)
0