Add Intellisense library
This commit is contained in:
parent
dcbf7d6d7f
commit
8dc186c7aa
@ -1,4 +1,5 @@
|
||||
using System.Net;
|
||||
using ExcelDna.IntelliSense;
|
||||
#if !NET472
|
||||
using System.Runtime.Versioning;
|
||||
#endif
|
||||
@ -40,12 +41,33 @@ public sealed class RhSolutionsAddIn : IExcelAddIn
|
||||
Excel = ServiceProvider.GetService<Application>();
|
||||
|
||||
EventsUtil.Initialize();
|
||||
string variable = Environment.GetEnvironmentVariable("ISTESTING");
|
||||
bool isTesting = variable switch
|
||||
{
|
||||
"true" => true,
|
||||
"false" => false,
|
||||
_ => false
|
||||
};
|
||||
if (!isTesting)
|
||||
{
|
||||
IntelliSenseServer.Install();
|
||||
}
|
||||
|
||||
ServicePointManager.SecurityProtocol =
|
||||
SecurityProtocolType.Tls12;
|
||||
}
|
||||
|
||||
public void AutoClose()
|
||||
{
|
||||
EventsUtil.Uninitialize();
|
||||
EventsUtil.Uninitialize(); bool isTesting = Environment.GetEnvironmentVariable("ISTESTING") switch
|
||||
{
|
||||
"true" => true,
|
||||
"false" => false,
|
||||
_ => false
|
||||
};
|
||||
if (!isTesting)
|
||||
{
|
||||
IntelliSenseServer.Uninstall();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,7 @@
|
||||
<Reference Path="Microsoft.Extensions.Logging.dll" Pack="true" />
|
||||
<Reference Path="Microsoft.Extensions.Options.dll" Pack="true" />
|
||||
<Reference Path="Microsoft.Extensions.Primitives.dll" Pack="true" />
|
||||
<Reference Path="ExcelDna.IntelliSense.dll" Pack="true" />
|
||||
<Reference Path="Newtonsoft.Json.dll" Pack="true" />
|
||||
<Reference Path="netDxf.dll" Pack="true" />
|
||||
<Reference Path="RhSolutions.ProductSku.dll" Pack="true" />
|
||||
|
@ -29,6 +29,7 @@
|
||||
<TreatAsUsed>true</TreatAsUsed>
|
||||
</PackageReference>
|
||||
<PackageReference Include="ExcelDna.Integration" Version="1.6.0" />
|
||||
<PackageReference Include="ExcelDna.IntelliSense" Version="1.6.0" />
|
||||
<PackageReference Include="ExcelDna.Interop" Version="15.0.1" />
|
||||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Bcl.HashCode" Version="1.1.1" />
|
||||
|
8
RhSolutions.Tests/.runsettings
Normal file
8
RhSolutions.Tests/.runsettings
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<RunSettings>
|
||||
<RunConfiguration>
|
||||
<EnvironmentVariables>
|
||||
<ISTESTING>true</ISTESTING>
|
||||
</EnvironmentVariables>
|
||||
</RunConfiguration>
|
||||
</RunSettings>
|
Loading…
Reference in New Issue
Block a user