diff --git a/Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/AssetScriptReferenceRetargeter.cs b/Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/AssetScriptReferenceRetargeter.cs index ef0b3f8..98b64c3 100644 --- a/Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/AssetScriptReferenceRetargeter.cs +++ b/Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/AssetScriptReferenceRetargeter.cs @@ -336,7 +336,8 @@ private static Dictionary ProcessCompiledDLLs(strin foreach (Assembly dll in dlls) { - if (dll.name.Contains("MixedReality")) + // TODO - this should be improved/it won't work for non microsoft dlls + if (dll.name.Contains("Microsoft.MixedReality")) { string dllPath = Utilities.GetFullPathFromAssetsRelative($"Assets/../MSBuild/Publish/InEditor/WindowsStandalone32/{dll.name}.dll"); File.Copy(dllPath, Path.Combine(tmpDirPath, $"{dll.name}.dll"), true); @@ -374,10 +375,6 @@ private static Dictionary ProcessCompiledDLLs(strin { Debug.LogError($"Encountered a MonoScript we get a null Type from: '{monoScript.name}'"); } - else if (type.Namespace == null || !type.Namespace.Contains("Microsoft.MixedReality.Toolkit")) - { - throw new InvalidDataException($"Type {type.Name} is not a member of the Microsoft.MixedReality.Toolkit namespace"); - } else { assemblyInformation.CompiledClasses.Add(type.FullName, new ClassInformation() { Name = type.Name, Namespace = type.Namespace, FileId = fileId, Guid = newDllGuid }); @@ -423,8 +420,8 @@ private static void CopyPluginContents(string outputPath) } Directory.CreateDirectory(pluginPath); - CopyFiles(directory, pluginPath, "Microsoft.MixedReality.Toolkit*.dll"); - CopyFiles(directory, pluginPath, "Microsoft.MixedReality.Toolkit*.pdb"); + CopyFiles(directory, pluginPath, "Microsoft.MixedReality*.dll"); + CopyFiles(directory, pluginPath, "Microsoft.MixedReality*.pdb"); } } diff --git a/Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/MSBuildTools.cs b/Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/MSBuildTools.cs index 3d8e1c3..c384397 100644 --- a/Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/MSBuildTools.cs +++ b/Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/MSBuildTools.cs @@ -139,6 +139,12 @@ public static void GenerateSDKProjects() } } + public static void RegenerateSDKProjects() + { + RegenerateEverything(reparseUnityData:true); + Debug.Log($"{nameof(RegenerateSDKProjects)} Completed Succesfully."); + } + [MenuItem("MSBuild/Documentation...", priority = 203)] public static void LaunchHelp() { @@ -180,7 +186,7 @@ private static void RefreshGeneratedOutput(bool forceGenerateEverything) bool shouldClean = EditorPrefs.GetInt($"{nameof(MSBuildTools)}.{nameof(currentBuildTarget)}") != (int)currentBuildTarget || EditorPrefs.GetInt($"{nameof(MSBuildTools)}.{nameof(targetFramework)}") != (int)targetFramework || forceGenerateEverything; - + if (shouldClean) { // We clean up previous build if the EditorPrefs currentBuildTarget or targetFramework is different from current ones. diff --git a/Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/UnityProjectInfo.cs b/Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/UnityProjectInfo.cs index d852e07..345bd1f 100644 --- a/Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/UnityProjectInfo.cs +++ b/Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/UnityProjectInfo.cs @@ -262,7 +262,7 @@ private CSProjectInfo GetProjectInfo(Dictionary projectsM if (!assemblyDefinitionInfo.BuiltInPackage) { - Uri dependencies = new Uri(Path.Combine(Utilities.AssetPath, "Dependencies")); + Uri dependencies = new Uri(Path.Combine(Utilities.AssetPath, "Dependencies\\")); foreach (PluginAssemblyInfo plugin in Plugins.Where(t => t.Type != PluginType.Native)) { if (!dependencies.IsBaseOf(plugin.ReferencePath) && (plugin.AutoReferenced || assemblyDefinitionInfo.PrecompiledAssemblyReferences.Contains(plugin.Name))) @@ -343,4 +343,4 @@ private List ScanForPluginDLLs() } } } -#endif \ No newline at end of file +#endif