com.unity.ide.visualstudio@2.0.16

## [2.0.16] - 2022-06-08

Integration:

- Prevent ADB Refresh while being in safe-mode with a URP project
- Fixed an issue keeping the progress bar visible even after opening a script with Visual Studio.
This commit is contained in:
Unity Technologies
2022-06-08 00:00:00 +00:00
parent b132c03a8a
commit 7c58d4170b
17 changed files with 49 additions and 111 deletions

View File

@@ -1,5 +1,13 @@
# Code Editor Package for Visual Studio
## [2.0.16] - 2022-06-08
Integration:
- Prevent ADB Refresh while being in safe-mode with a URP project
- Fixed an issue keeping the progress bar visible even after opening a script with Visual Studio.
## [2.0.15] - 2022-03-21
Integration:
@@ -8,15 +16,12 @@ Integration:
- Added support for keeping file/folder structure when working with external packages.
- Fixed project generation not being refreshed when selecting Visual Studio as the preferred external editor.
## [2.0.14] - 2022-01-14
Integration:
- Remove package version checking.
## [2.0.13] - 2022-01-12
Integration:

View File

@@ -0,0 +1,5 @@
Bundle style (release)
xcodebuild -configuration Release
Standalone style (test)
clang++ -D BUILD_APP -framework Foundation -framework AppKit main.mm

View File

@@ -1,26 +0,0 @@
fileFormatVersion: 2
guid: 1f68874d6ae00db4a993b9507d065658
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 7cec3e1820a40be4486946c20d7ffd00
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -11,6 +11,9 @@
#include <windows.h>
#include <shlwapi.h>
#include <fcntl.h>
#include <io.h>
#include "BStrHolder.h"
#include "ComPtr.h"
#include "dte80a.tlh"
@@ -441,6 +444,10 @@ static bool VisualStudioOpenFile(
}
int wmain(int argc, wchar_t* argv[]) {
// We need this to properly display UTF16 text on the console
_setmode(_fileno(stdout), _O_U16TEXT);
if (argc != 3 && argc != 5) {
std::wcerr << argc << ": wrong number of arguments\n" << "Usage: com.exe installationPath solutionPath [fileName lineNumber]" << std::endl;
for (int i = 0; i < argc; i++) {

View File

@@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 6ffa4010724f8d54aacbed867d4a5aa6
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,26 +0,0 @@
fileFormatVersion: 2
guid: 013868b12dff0dc43adcc33513ae71bf
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 97115cd910ade104a9d05d65a6b6b7d9
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,6 @@
Direct style:
cl /EHsc /std:c++17 COMIntegration.cpp /link Shlwapi.lib /out:"..\Release\COMIntegration.exe"
CMake style:
cmake ../COMIntegration~ -B ./build
cmake --build ./build --config=release -- /p:OutDir=..

View File

@@ -1 +0,0 @@
cl /EHsc /std:c++17 COMIntegration.cpp /link Shlwapi.lib /out:"..\Release\COMIntegration.exe"

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 3b44687349be79f4184ba013fb6ffa0c
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
using System;
using UnityEditor;
using UnityEditor.Compilation;
namespace Microsoft.Unity.VisualStudio.Editor
@@ -37,6 +38,17 @@ namespace Microsoft.Unity.VisualStudio.Editor
}
}
private static readonly Lazy<bool> _lazyIsInSafeMode = new Lazy<bool>(() =>
{
// internal static extern bool isInSafeMode { get {} }
var ieu = typeof(EditorUtility);
var pinfo = ieu.GetProperty("isInSafeMode", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic);
if (pinfo == null)
return false;
return Convert.ToBoolean(pinfo.GetValue(null));
});
public static bool IsInSafeMode => _lazyIsInSafeMode.Value;
public static Version LatestLanguageVersionSupported(Assembly assembly)
{
#if UNITY_2020_2_OR_NEWER

View File

@@ -175,7 +175,6 @@ namespace Microsoft.Unity.VisualStudio.Editor
public void SyncAll()
{
AssetDatabase.Refresh();
_generator.Sync();
}
@@ -319,7 +318,9 @@ namespace Microsoft.Unity.VisualStudio.Editor
CreateNoWindow = true,
UseShellExecute = false,
RedirectStandardOutput = true,
StandardOutputEncoding = System.Text.Encoding.Unicode,
RedirectStandardError = true,
StandardErrorEncoding = System.Text.Encoding.Unicode,
}
};
var result = process.Start();

View File

@@ -239,6 +239,9 @@ namespace Microsoft.Unity.VisualStudio.Editor
if (!EditorPrefs.GetBool("kAutoRefresh", true))
return;
if (UnityInstallation.IsInSafeMode)
return;
RunOnceOnUpdate(AssetDatabase.Refresh);
}

View File

@@ -2,24 +2,24 @@
"name": "com.unity.ide.visualstudio",
"displayName": "Visual Studio Editor",
"description": "Code editor integration for supporting Visual Studio as code editor for unity. Adds support for generating csproj files for intellisense purposes, auto discovery of installations, etc.",
"version": "2.0.15",
"version": "2.0.16",
"unity": "2019.4",
"unityRelease": "25f1",
"dependencies": {
"com.unity.test-framework": "1.1.9"
},
"relatedPackages": {
"com.unity.ide.visualstudio.tests": "2.0.15"
"com.unity.ide.visualstudio.tests": "2.0.16"
},
"upm": {
"changelog": "Integration:\n\n- Improved project generation performance.\n- Added support for keeping file/folder structure when working with external packages.\n- Fixed project generation not being refreshed when selecting Visual Studio as the preferred external editor."
"_upm": {
"changelog": "Integration:\n\n- Prevent ADB Refresh while being in safe-mode with a URP project\n- Fixed an issue keeping the progress bar visible even after opening a script with Visual Studio."
},
"upmCi": {
"footprint": "d5d60c3083dbc14a4be33dc1f8c4e7fe147ffb74"
"footprint": "3d5e14bed71dd5b89e088160c170e814d0058248"
},
"repository": {
"url": "https://github.cds.internal.unity3d.com/unity/com.unity.ide.visualstudio.git",
"type": "git",
"revision": "ca1ece42f5a2c5484ba15a15bb975ccc1f6a1a3c"
"revision": "c01855ef6461b821ab0226135e96a4ee86de96be"
}
}