TortoiseSVN issue tracker plugin built - but not implemented - plugins

I've read all the info of how to build an issue tracker plug-in in C# for TortoiseSVN.
I done that, building a class library with integration to my issue tracking (SalesForce).
I don't know how to install it to TortoiseSVN itself.
I've created a setup for the solution and I can install it (like JIRA solution that I found online).
I don't know what is missing.
Update:
I did what you wrote, made sure everything is correct.
I don't get the name of the provider, but the GUID, and an error:
alt text http://img339.imageshack.us/img339/8558/sfsvnerror.jpg
what can it be?

1) You need to make sure that you have the right CLSIDs registered in the registry - so my installer inserts the following (fake) values:
(This, I think should be the equivalent of running RegASM as detailed at the bottom of the issue-tracker-plugins.txt file.
Installer Registry Changes Image http://img291.imageshack.us/img291/1618/registryinstaller.png
You should be able to import this registry file to get you started:
(You will probably have to dynamically update the CodeBase location, based on where the dll is installed to)
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\CLSID{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}]
#="FogBugzPlugin.MyPlugin"
[HKEY_CLASSES_ROOT\CLSID{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}\Implemented
Categories]
[HKEY_CLASSES_ROOT\CLSID{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}\Implemented
Categories{3494FA92-B139-4730-9591-01135D5E7831}]
[HKEY_CLASSES_ROOT\CLSID{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}\Implemented
Categories{62C8FE65-4EBB-45E7-B440-6E39B2CDBF29}]
[HKEY_CLASSES_ROOT\CLSID{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}\InprocServer32]
#="mscoree.dll"
"ThreadingModel"="Both"
"Class"="FogBugzPlugin.MyPlugin"
"Assembly"="MyAssemblyName,
Version=1.0.0.0, Culture=neutral,
PublicKeyToken=31286c9d1d5aa00a"
"RuntimeVersion"="v2.0.50727"
"CodeBase"="file:///C:/Program
Files/folder/AAAAAAAAAAAAA/MyAssemblyName.dll"
[HKEY_CLASSES_ROOT\CLSID{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}\InprocServer32\1.0.0.0] "Class"="FogBugzPlugin.MyPlugin"
"Assembly"="MyAssemblyName,
Version=1.0.0.0, Culture=neutral,
PublicKeyToken=31286c9d1d5aa00a"
"RuntimeVersion"="v2.0.50727"
"CodeBase"="file:///C:/Program
Files/folder/AAAAAAAAAAAAA/MyAssemblyName.dll"
[HKEY_CLASSES_ROOT\CLSID{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}\ProgId]
#="FogBugzPlugin.MyPlugin"
2) You need to make sure that the user gets the BugTraq Associations added to the registry:
[HKEY_CURRENT_USER\Software\TortoiseSVN\BugTraq Associations\0]
"Provider"="{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}"
"WorkingCopy"="c:\"
"Parameters"=""
(This can also be done manually by the user by going to TSVN -> Settings -> Hook Scripts -> Issue Tracker Integration -> Add
Where "{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}" is the GUID of the provider that you created.
All being well, the plugin should now be available to the user. when they open the commit dialog.
Update:
Troubleshooting the "Provider Shows As GUID" Issue seen above...
OK... so assuming your provider GUID is
{0DA7E319-1DCE-4A94-65555B5B6CE5}
You should check:
Your plugin implements IBugTraqProvider and IBugTraqProvider2 and has the GUID applied to it:
namespace FogBugzPlugin
{
[ComVisible(true),
Guid("0DA7E319-1DCE-4A94-65555B5B6CE5"),
ClassInterface(ClassInterfaceType.None)]
public class MyPlugin : IBugTraqProvider, IBugTraqProvider2
So now you should have:
GUID: 0DA7E319-1DCE-4A94-65555B5B6CE5
PluginName: FogBugzPlugin.MyPlugin
Go to regedit and have a look and see what you have in the registry. It should be along the lines of:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\CLSID\{0DA7E319-1DCE-4A94-65555B5B6CE5}]
#="FogBugzPlugin.MyPlugin"
[HKEY_CLASSES_ROOT\CLSID\{0DA7E319-1DCE-4A94-65555B5B6CE5}\Implemented Categories]
[HKEY_CLASSES_ROOT\CLSID\{0DA7E319-1DCE-4A94-65555B5B6CE5}\Implemented Categories\{3494FA92-B139-4730-9591-01135D5E7831}]
[HKEY_CLASSES_ROOT\CLSID\{0DA7E319-1DCE-4A94-65555B5B6CE5}\Implemented Categories\{62C8FE65-4EBB-45E7-B440-6E39B2CDBF29}]
[HKEY_CLASSES_ROOT\CLSID\{0DA7E319-1DCE-4A94-65555B5B6CE5}\InprocServer32]
#="mscoree.dll"
"ThreadingModel"="Both"
"Class"="FogBugzPlugin.MyPlugin"
"Assembly"="FogBugz2Tortoise, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31286c9d1d5aa00a"
"RuntimeVersion"="v2.0.50727"
"CodeBase"="file:///C:/Program Files/folder/FogBugz2Tortoise/FogBugz2Tortoise.dll"
[HKEY_CLASSES_ROOT\CLSID\{0DA7E319-1DCE-4A94-65555B5B6CE5}\InprocServer32\1.0.0.0]
"Class"="FogBugzPlugin.MyPlugin"
"Assembly"="FogBugz2Tortoise, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31286c9d1d5aa00a"
"RuntimeVersion"="v2.0.50727"
"CodeBase"="file:///C:/Program Files/folder/FogBugz2Tortoise/FogBugz2Tortoise.dll"
[HKEY_CLASSES_ROOT\CLSID\{0DA7E319-1DCE-4A94-65555B5B6CE5}\ProgId]
#="FogBugzPlugin.MyPlugin"
You should also have the ProgID / CLSID entry directly under HKCR:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\FogBugzPlugin.MyPlugin]
#="FogBugzPlugin.MyPlugin"
[HKEY_CLASSES_ROOT\FogBugzPlugin.MyPlugin\CLSID]
#="{0DA7E319-1DCE-4A94-65555B5B6CE5}"
Hope this helps - I'd check the last point first.

Related

Firebase Database in Unity with REST API

I am trying to create a connection to the Firebase Realtime Database by following this tutorial: https://medium.com/#rotolonico/firebase-database-in-unity-with-rest-api-42f2cf6a2bbf to understand how it works and modify as I go. However, I am getting the following errors (these are just some of the errors):
Assembly DLL name is reserved for internal use: Assets/UnityEngine.dll (did files generated by a build accidentally end up in your Assets/ folder?)
C:\Program files\2019.4.20f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\UI\Core\FontData.cs(135,16): error CS0433: The type 'TextAnchor' exists in both 'UnityEngine.TextRenderingModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and 'UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'`
C:\Program Files\2019.4.20f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\UI\Core\InputField.cs(241,10): error CS0433: The type 'SerializeField' exists in both 'UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and 'UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
These errors are populating when I did the following steps:
Navigate to the Build Files (DLL) folder.
Open CommonData.csproj in your favorite text editor.
Change the UnityInstallFolder value on line 6 to point to your Unity installation directory
On OSX this is likely /Applications/Unity/Editor
On Windows this is likely C:\Program Files (x86)\Unity\Editor
Double click FullSerializer.sln to open up the solution
Run a build-all (F6 in visual studio). Alternatively, you can right-click any of the three projects to build only one of them.
FullSerializer - NoUnity builds Full Serializer so that you can use it outside of Unity.
FullSerializer - Unity builds Full Serializer to a DLL
FullSerializer - Unity - WinRT builds Full Serializer with WinRT APIs (if you're targeting the Windows Store or the Windows Phone export platforms)
You will find the DLLs inside of the Build folder. Please add them to your Unity project's Asset folder.
Here is the path where unity is installed:
C:\Program Files\2019.4.20f1\Editor
I opened the FullSerializer.sln, and build one of the three projects, and so on.
I am not sure what I am doing wrong. Any help would be appreciated.
I was able to determine the issue. It appears that although the instruction suggests adding the source folder in the assets folder of the Unity Project, I remove it from there and put it in the same level as the assets folder. That resolved the issue. Hope this helps anyone else who has encountered this issue.

Wix Setup Project breaks unrelated Migrations update-database call

Running update-database from the Package Manager Console on an ASP.NET MVC Web Application fails after I add an unrelated Wix setup project to my solution.
Why is update-database accessing this unrelated project? Why does the presence of the wix project trigger a load of an assembly that cannot be found? How do I fix this?
This happens in a larger solution with web, desktop, installer projects, but after considerable head-scratching I reproduced this in isolation:
Setup a new stock-standard VS solution with an ASP.NET MVC Web Application, Entity Framework, enable migrations, add WebMatrix components, setup Role provider.
Add Configuration.Seed() method to call out to WebMatrix.WebData.WebSecurity.InitializeDatabaseConnection(..) and System.Web.Security.Roles.
Run update-database. It will work fine. Now add a Wix setup project (no need to configure) and it will fail at/before executing Seed() with
Could not load file or assembly 'Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
So, it seems having a Wix project in my solution triggers the load of an additional (not found) assembly when trying to call WebSecurity / WebMatrix methods through update-database from the Package Manager Console.
Workaround: Unload the Wix setup project and restart Visual Studio. There is no need to remove the project entirely.
Adding the missing dll to the GAC or a reference to the machine.config does not help. The dll is found but loading it errors out with
System.IO.FileLoadException: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)
Using FUSLOGVW.exe to log assembly load events didn't help. It basically shows that update-database can't find the v15.1 dll because it's not in the GAC and there is no app/host/system config file pointing at it.
Running the seed method from the running web application (enable automatic migration) works fine.
And yes, I am setting PMC "default project" to the web application, ie, point update-database at the web application.
Details:
Visual Studio Professional 2017 on Win 10 Pro fully patched.
Recently upgraded VS from 2015. No such problem under 2015.
Wix Toolset 3.11.0.1528
Package Manager Console 4.1.0.2427
System.Web.Mvc 5.2.3.0
Entity Framework 6.1.3
WebMatrix.Data.dll 3.0.0.0
WebMatrix.WebData.dll 3.0.0.0
Microsoft.Build.Framework.dll v15.1.0.0 lives in C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\ and Visual studio has a redirect to it in its app.config.
Snippets:
Configuration.cs:
class Configuration : DbMigrationsConfiguration<MyDbContextHere>
{
public Configuration() { AutomaticMigrationsEnabled = false; }
protected override void Seed(Stash context)
{
WebSecurity.InitializeDatabaseConnection("DefaultConnection", "UserProfiles", "UserId", "UserName", autoCreateTables: true);
if(!Roles.RoleExists("G1")) Roles.CreateRole("G1");
}
}
`
web.config:
`
<configuration>
<system.web>
<roleManager enabled="true" defaultProvider="SimpleRoleProvider">
<providers>
<clear />
<add name="SimpleRoleProvider" type="WebMatrix.WebData.SimpleRoleProvider, WebMatrix.WebData" />
</providers>
</roleManager>

Scripts fail with error that Microsoft.ServiceFabric.Internal.Strings.dll is unavailable when "Microsoft Service Fabric" is installed

After upgrading to the latest tools, runtime and SDK (5.5.216.0), PowerShell scripts, such as TestConfiguration.ps1, fail with an error that Microsoft.ServiceFabric.Internal.Strings.dll version 5.0.0.0 can't be found. As soon as I deinstall 'Microsoft Service Fabric' from the control panel, it works just fine. This behavior seems very similar to the Newtonsoft.Json.dll issue that was resolved in 5.5.216.0, just with a different assembly this time around.
Is this a known issue?
It quickly gets tedious to have to uninstall 'Microsoft Service Fabric' when I run certain scripts and then have to install it again for others that require it.
Example of error:
PS C:\git\sf-admin\DeploymentScripts\Microsoft.Azure.ServiceFabric.WindowsServer> .\TestConfiguration.ps1 ..\ClusterConfig.Production.Shared.json
Trace folder doesn't exist. Creating trace folder: C:\git\sf-admin\DeploymentScripts\Microsoft.Azure.ServiceFabric.WindowsServer\DeploymentTraces
Running Best Practices Analyzer...
Standalone package dependent files not found. Check package structure. Error: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.ServiceFabric.Internal.Strings, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or on
e of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.ServiceFabric.Internal.Strings, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at Microsoft.ServiceFabric.ClusterManagementCommon.ValidatorExtensions.ThrowValidationExceptionIfNull[T](T parameter, String parameterName)
at Microsoft.ServiceFabric.DeploymentManager.BPA.BestPracticesAnalyzer.IsJsonConfigModelValid(StandAloneInstallerJsonModelBase config)
Thanks,
Hans
I believe you're getting that error due to the SDK/Runtime installing dll's to the GAC which are being picked up.
Try running moving your Microsoft.Azure.ServiceFabric.WindowsServer folder to another machine and running TestConfiguration.ps1 again.
If you're running the scripts from a box without internet access then you'll need to specify the location of the .cab which contains the runtime
-FabricRuntimePackagePath C:\temp\Microsoft.Azure.ServiceFabric.WindowsServer.5.5.216.0\MicrosoftAzureServiceFabric5.5.216.0.cab

Entity Framework 7 with Universal Windows Platform Add-Migration

I'm trying to implement Universal Windows Platform application with EntityFramework and SQLite (according to: http://ef.readthedocs.org/en/latest/platforms/uwp/getting-started.html) but I have problem with Add-Migration command.
Here is my setup:
Visual Studio 2015 Update 1
EntityFramework.SQLite: "7.0.0-rc1-final"
Error that I got while adding migrations is:
Could not load file or assembly 'System.Collections.Immutable, Version=1.1.36.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Thanks in advance for your help!
It is clearly that you miss a dll "System.Collections.Immutable, Version=1.1.36.0" in your project.
To solve this problem, you can open the Nuget tool, and search for System.Collections.Immutable, then in the "Version" label select the Version 1.1.36, by default it is the latest version 1.1.37.
You can also try to update your VS tool, this possible may also solve your problem.

Determine version of Entity Framework I am using?

I believe there are two versions 1 and 2? And version 2 is referred to as Entity Framework 4.0?
How can I tell what version is being used in an application?
This is in my web.config does this mean I am using version 2?
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
Another way to get the EF version you are using is to open the Package Manager Console (PMC) in Visual Studio and type Get-Package at the prompt. The first line with be for EntityFramework and list the version the project has installed.
PM> Get-Package
Id Version Description/Release Notes
-- ------- -------------------------
EntityFramework 5.0.0 Entity Framework is Microsoft's recommended data access technology for new applications.
jQuery 1.7.1.1 jQuery is a new kind of JavaScript Library....
It displays much more and you may have to scroll back up to find the EF line, but this is the easiest way I know of to find out.
There are two versions: 1 and 4. EFv4 is part of .net 4.0, and EFv1 is part of .net 3.5 SP1.
Yes, the config setting above points to EFv4 / .net 4.0.
EDIT
If you open the references folder and locate system.data.entity, click the item, then check the runtime version number in the Properties explorer, you will see the sub version as well. Mine for instance shows runtime version v4.0.30319 with the Version property showing 4.0.0.0. The EntityFramework.dll can be viewed in this fashion also. Only the Version will be 4.1.0.0 and the Runtime version will be v4.0.30319 which specifies it is a .NET 4 component. Alternatively, you can open the file location as listed in the Path property and right-click the component in question, choose properties, then choose the details tab and view the product version.
can check it in packages.config file.
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="6.0.2" targetFramework="net40-Client" />
</packages>
if you are using EF core this command below could help
dotnet ef --version
To answer the first part of your question: Microsoft published their Entity Framework version history here.
If you open the references folder and locate system.data.entity, click the item, then check the runtime version number in the Properties explorer, you will see the sub version as well. Mine for instance shows v4.0.30319 with the Version property showing 4.0.0.0.
If you go to references, click on the Entity Framework, view properties It will tell you the version number.
internal static string GetEntityFrameworkVersion()
{
var version = "";
var assemblies = System.AppDomain.CurrentDomain.GetAssemblies().Select(x => x.FullName).ToList();
foreach(var asm in assemblies)
{
var fragments = asm.Split(new char[] { ',', '{', '}' }, StringSplitOptions.RemoveEmptyEntries).Select(x=> x.Trim()).ToList();
if(string.Compare(fragments[0], EntityFramework, true)==0)
{
var subfragments = fragments[1].Split(new char[] { '='}, StringSplitOptions.RemoveEmptyEntries);
version =subfragments[1];
break;
}
}
return version;
}
In Solution Explorer Under Project
Click on Dependencies->NuGet->Microsoft.NetCore.All-> Here list of all Microsoft .NetCore pakcages will appear. Search for Microsoft.EntityFrameworkCore(2.0.3) in bracket version can be seen
Like this
After finding package
For .NET Core, this is how I'll know the version of EntityFramework that I'm using. Let's assume that the name of my project is DemoApi, I have the following at my disposal:
I'll open the DemoApi.csproj file and take a look at the package reference, and there I'll get to see the version of EntityFramework that I'm using.
Open up Command Prompt, Powershell or Terminal as the case maybe, change the directory to DemoApi and then enter this command: 👉🏻
dotnet list DemoApi.csproj package