Windows 8.1 | Code d'erreur : 0x80073712 - powershell

When I try to enable IIS, Windows PowerShell 2.0 (this what I really need because SQL server needs it), I get the following error:
Code d'erreur : 0x80073712
I tried all solutions that I found on the Internet like:
http://windows.microsoft.com/fr-xf/windows-8/windows-update-error-0x80073712
but no luck. Help please.

Related

Vs Code : Error: could not open `C:\Users\folder-name'

I was trying to implement a Spring boot application on vs code and came up with this error when I tried to run the code (Screenshot below). I am not clear what this error indicates and did not know what exactly to look for on the internet. could anyone tell me how I can resolve this error?
edit:
as I was told to copy-paste the error message as text, here it is.
PS D:\study material\java code\springbootdemo> cd 'd:\study material\java code\springbootdemo'; & 'c:\Users\manjeet arneja\.vscode\extensions\vscjava.vscode-java-debug-0.27.0\scripts\launcher.bat' 'C:\Program Files\AdoptOpenJDK\jdk-11.0.6.10-hotspot\bin\java.exe' '-Dfile.encoding=UTF-8' '#C:\Users\manjeet' 'arneja\AppData\Local\Temp\cp_9w87n9v9bnokxm9i3k10qtvnm.argfile' 'com.explore.springbootdemo.DemoApplication'
Error: could not open `C:\Users\manjeet'

Entity Framework PowerShell script cannot be loaded by Visual Studio because its operation is blocked by software restriction policies

When I load Package Manager Console within Visual Studio 2017 v15.9.6 in a project that uses Entity Framework I receive the following error:
\packages\EntityFramework.6.2.0\tools\init.ps1 cannot be loaded because its operation is blocked by software restriction
policies, such as those created by using Group Policy.
At line:1 char:45
+ ... rgs+=$_}; & 'C:\Bitbucket\project-path\packages\EntityFramework.6.2. ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
This prevents me from running commands specific to Entity Framework like "Update-Database" or "Add-Migration".
Here are things I have tried:
Reinstall Visual Studio
In Group Policy Editor, for both Computer Configuration and User Configuration, I have enabled the setting "Turn on Script Execution" that is located at "Administrative Templates\Windows Components\Windows PowerShell". The setting for both configurations has the "Execution Policy" set to "Allow all scripts".
I've tried locally in the Package Manager Console setting the "Process" scope to both "Bypass" and "Unrestricted", and then manually loading the Entity Framework init.ps1 script. I receive the same error.
I've also tried modifying registry keys for PowerShell to set the ExecutionPolicy to "Unrestricted" in a few places. Those places are at:
HKLM\Software\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell
HKLM\Software\Microsoft\PowerShell\1\ShellIds\Microsoft.SqlServer.Management.PowerShell.sqlps120
HKLM\Software\Microsoft\PowerShell\1\ShellIds\Microsoft.SqlServer.Management.PowerShell.sqlps140
I've restarted multiple times in between doing all of the above.
When I run the command "Get-ExecutionPolicy -List", here are my results"
Scope ExecutionPolicy
----- -----------------------
MachinePolicy Undefined
UserPolicy Unrestricted
Process Undefined
CurrentUser Unrestricted
LocalMachine Unrestricted
After all of the above I expected to be able to just load Visual Studio as normal, launch Package Manager Console, and not receive any errors when it tries to run the Entity Framework init.ps1 script. I must be missing something or doing something incorrectly. What do I need to do to get Visual Studio to work as expected?
Some more information is that this is a computer joined to a company domain, but no other developers have this issue. There isn't a group policy set by an administrator that is trickling down preventing me from running scripts.
The error may be occurring because of an invalid certificate from Microsoft. Check in Control Panel => Internet Options => Content => Certificates on the Untrusted Publishers tab. Remove Microsoft Corporation from this list.
Sounds bizarre but it worked for me.
Tks https://github.com/NuGet/Home/issues/7158
Remove file inside
control=>internet option => content => certificates =>Untrusted publishers
then problem will solve
Try downgrading to EF 6.1.2.
I ran into the same problem as you. I tried changing the Group Execution Policies which in my case didn't work, because of some restriction on my local machine (may be set by my school admin). In another project I used 6.1.2 where things like migration was no problem.

How to get Resharpers InspectCode to recognize Plugins?

I am trying to run ReSharpers command line tool InspectCode.exe. It's running fine doing it's job with the expected output.
However after my earlier attempt to get plugins to work, this time with the new version it is supposed to be supported. There is a switch in the command line interface that allows to specify the extension you want to use.
/extensions (/x) – allows using ReSharper extensions that affect code analysis. To use an extension, specify its ID, which you can find by opening the extension package page in the ReSharper Gallery, and then the Package Statistics page. Multiple values are separated with the semicolon.
But I cannot get it to work properly. I cannot even provoke any reaction to the /x switch at all. No matter how or what I pass, I get no feedback from the executable and the output is identical. I don't even get an error message when passing obvious garbage.
I tried the following commandlines for the exact same result:
inspectcode.exe /o="rcli.xml" /swea /x="ReSharper.StyleCop" "my.sln"
inspectcode.exe /o="rcli.xml" /swea /x=ReSharper.StyleCop "my.sln"
inspectcode.exe /o="rcli.xml" /swea "my.sln"
inspectcode.exe /o="rcli.xml" /swea /x=ABCDEFG "my.sln"
Result
JetBrains Inspect Code 9.1.1
Running in 64-bit mode, .NET runtime 4.0.30319.18444 under Microsoft Windows NT
6.1.7601 Service Pack 1
Enabled solution-wide analysis according to Inspect Code command line Setting.
Analyzing files
[files]
Inspection report was written to rcli.xml
What am I doing wrong? How to get extensions to work?
I already tried the R# forums, but it took them more then 24h to approve my post and so far I'm not sure someone else even read it.
Unfortunately, the support for extensions was dropped in 9.0 due to the refactorings in the "ReSharper platform". I hope that JetBrains will bring it back soon.
See RSRP-436208.
This is a late answer that might help future readers (like myself). Currently inspectcode.exe will automatically look for and use any NuGet packages that are in the same folder as the executable (source).
Example for CleanCode extension:
if you have a R# instance on some machine and install the extension, it will be placed in C:\Users\{user}\AppData\Local\JetBrains\plugins\MO.CleanCode.5.6.15
copy MO.CleanCode.5.6.15.nupkg and paste it next to inspectcode.exe
when running inspectcode with verbosity = VERBOSE, the extension should appear in the Zones list:
$cmd = "..\JetBrains.ReSharper.CommandLineTools.2019.3.4\inspectcode.exe"
$outputFile = "..\Output\$($outputName).xml"
& $cmd -o="$outputFile" $sln --verbosity=VERBOSE
Zones: (52pcs)[CodeInspectionPageImplZone, DaemonEngineZone,
DaemonZone, IAmd64CpuArchitectureHostZone, IAspMvcZone,
IBatchToolEnvironmentZone, IClrImplementationHost Zone,
IClrPsiLanguageZone, ICodeEditingOptionsPageImplZone,
IConsoleEnvironmentZone, ICppProductZone, ICpuArchitectureHostZone,
IDocumentModelZone, IEnvironmentZone, IHostSolutionZone,
IInspectCodeConsoleEnvironmentZone, IInspectCodeEnvironmentZone,
IInspectCodeZone, ILanguageAspZone, ILanguageBuildScriptsZone,
ILanguageCppZone, I LanguageCSharpZone, ILanguageCssZone,
ILanguageHtmlZone, ILanguageIlZone, ILanguageJavaScriptZone,
ILanguageMsBuildZone, ILanguageNAntZone, ILanguageProtobufZone, ILa
nguageRazorZone, ILanguageRegExpZone, ILanguageResxZone,
ILanguageVBZone, ILanguageXamlZone, INetFrameworkHostZone, INuGetZone,
IOperatingSystemHostZone, IProjectMode lZone,
IPsiAssemblyFileLoaderImplZone, IPsiLanguageZone,
IPublicVisibilityZone, IRdFrameworkZone, IRiderModelZone,
ISinceClr2HostZone, ISinceClr4HostZone, ITextContro lsZone,
IToolsOptionsPageImplZone, IWebPsiLanguageZone, IWindowsNtHostZone,
PsiFeaturesImplZone, ReplaceableByIntelliJPlatformZone, SweaZone]
Packages: (23pcs)[JetBrains.ExternalAnnotations,
JetBrains.Platform.Core.Ide, JetBrains.Platform.Core.IisExpress,
JetBrains.Platform.Core.MsBuild, JetBrains.Platform. Core.Shell,
JetBrains.Platform.Core.Text, JetBrains.Platform.Interop.CommandLine,
JetBrains.Platform.Interop.dotMemoryUnit.Framework,
JetBrains.Platform.Interop.dotMe moryUnit.Interop.Console,
JetBrains.Platform.Interop.dotMemoryUnit.Interop.Ide,
JetBrains.Platform.RdProtocol, JetBrains.Psi.Features.Core,
JetBrains.Psi.Features.Cpp .Src.Core, JetBrains.Psi.Features.src,
JetBrains.Psi.Features.Tasks, JetBrains.Psi.Features.UnitTesting,
JetBrains.Psi.Features.Web.Core, JetBrains.ReSharperAutomatio
nTools.src.CleanupCode,
JetBrains.ReSharperAutomationTools.src.CommandLineCore,
JetBrains.ReSharperAutomationTools.src.CommandLineProducts,
JetBrains.ReSharperAutomat ionTools.src.DuplicatesFinder,
JetBrains.ReSharperAutomationTools.src.InspectCode, MO.CleanCode]

Why did SQL Server Management Studio 2008 command-line switches stop working?

I've always relied heavily on Windows shortcuts to SSMS that include command-line switches allowing me to quickly open up a specific database on a specific server. For example
Ssms.exe -S 123.123.123.123 -U sa -P goodpassword -d DbName
or
Ssms.exe -S . -E -d DbName
These suddenly stopped working. I get this error from SSMS:
Failed to create new SQL Server script.
Object reference not set to an instance of an object. (AppIDPackage)
Program Location: at Microsoft.SqlServer.Management.UI.VSIntegration.
AppIDPackage.AppIDPackage.OpenConnectionDialogWithGlobalConnectionInfo()
I can still launch SSMS without the command-line switches, and then manually establish the connections. Some command-line switches still work, for example
ssms.exe -nosplash
works fine.
I get the same error with any combination of the -S, -E, and -d command-line switches. It doesn't matter if I'm pointing to a valid server or database or not, or if my login credentials are good or not. I can point to the older version of SSMS and it works fine, but not the 2008 version.
This post on MSDN's forums is all I've found online, but MS hasn't been very helpful on this thread.
Any ideas how I might start to fix this? I work with a lot of different databases on different servers, and I really rely on these shortcuts.
I've thrown the DLL in question at reflector and it's given me back the code at the bottom of this post, sadly there's nothing immediately obvious in the code that makes it easy to work out why it's stopped working for you (wouldn't it be nice if Microsoft shipped debug symbols with anything they produce that's written against the CLR?).
There are a couple of places where the code makes me wonder if you might have a corrupted "recently used servers" list or something similar, perhaps you could try following the steps listed in this question to clear them out and see if that helps.
private void OpenConnectionDialogWithGlobalConnectionInfo()
{
if ((ServiceCache.GlobalConnectionInfo != null) && (ServiceCache.GlobalConnectionInfo.Count != 0))
{
try
{
using (ConnectionDialog dialog = new ShellConnectionDialog())
{
IDbConnection connection;
dialog.ImportRegisteredServersOnFirstLaunch = true;
dialog.AddServer(new SqlServerType());
UIConnectionInfo connectInfo = ServiceCache.GlobalConnectionInfo[0].Copy();
if (dialog.TryToConnect(this.PopupOwner, ref connectInfo, out connection) == DialogResult.OK)
{
this.ScriptFactory.CreateNewBlankScript(ScriptType.Sql, connectInfo, connection);
}
}
}
catch (Exception exception)
{
ExceptionMessageBox box = new ExceptionMessageBox(new ApplicationException(SRError.FailedToCreateNewSqlScript, exception));
box.Caption = SRError.MessageBoxCaption;
box.Show(this.PopupOwner);
}
}
ServiceCache.GlobalConnectionInfo = null;
}
The ObjectExplorer window must be open. Don't hide.
I solved my problem this way :)
Works fine like this:
sqlwb.exe -S . -E -d dbName
I'm using SSMS2008 against a SQL2005 database, and the ssms command line works fine here.
This is the version info produced by the SSMS About dialog:
Microsoft SQL Server Management Studio 10.0.1600.22 ((SQL_PreRelease).080709-1414 )
Microsoft Data Access Components (MDAC) 6.0.6001.18000 (longhorn_rtm.080118-1840)
Microsoft MSXML 2.6 3.0 5.0 6.0
Microsoft Internet Explorer 8.0.6001.18813
Microsoft .NET Framework 2.0.50727.3074
Operating System 6.0.6001
There are several sources (MSSqlTips, and here) that state the command line arguments are available on sqlwb.exe. Yet the Books Online page for ssms states that the options are available on ssms.

Set-SPDebug -trace 1 not working in PowerShell host

I have a few PowerShell hosts, and in these hosts Set-SPDebug -trace 1 does not work.
I tested PoshConsole, here it works, but for example the Host6 in the PowerShell SDK does not work.
Any idea what is required in a host to get this working?
My smart collegue Jan Pieter Guelen found the answer after going through the PowerShell automation api using Reflector. You have to enable history in CreatePipeline with the following code:
pipeline = runspace.CreatePipeline("", true);
Now the tracing works!Even the Wrox book "Windows PowerShell Programming" does not mention this:-( The PowerShell SDK sample (Host6) should include this as well... PoshConsole does this as well, but I never thought that this would be the problem.
In what way isn't it working? If you aren't seeing any output, did you override the WriteDebugLine() method of the PSHostUserInterface base class e.g.:
public override void WriteDebugLine(string message)
{
this.WriteLine(ConsoleColor.DarkYellow, ConsoleColor.Black,
String.Format(CultureInfo.CurrentCulture, "DEBUG: {0}", message));
}