I've been following this very comprehensive guide to enabling proprietary codecs in CefSharp.
Unfortunately I've hit a snag at step 16. I've used automate-git.py to build the cef redistributables, and copied them into the cef-binary repo.
However, when I try to build cef-binary using build.ps1, I'm getting the error below, regarding libcef_dll_wrapper.vcxproj not being found.
It's true - that file does not exist.
All I have in the directory it's looking for that file is the following:
cef_binary_distribution folder
Should it exist? Or is the build script somehow wrong? Have I messed something up during automate-git.py?
The output of the cef-binary build:
.\build.ps1 vs2013
Bootstrapping
Starting to build targeting toolchain v120
Targeting v120 using configuration Debug on platform x86
Get-Content : Cannot find path
'D:\git\Chromium\cef-binary\cef_binary_3.2526.1373.gb660893_windows32\libcef_dll\libcef_dll_wrapper.vcxproj' because it does not exist.
At D:\git\Chromium\cef-binary\build.ps1:224 char:6
+ (Get-Content $CefProject) | Foreach-Object {$_ -replace "<RuntimeLibrary>Mul ...
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (D:\git\Chromium...wrapper.vcxproj:String) [Get-Content], ItemNotFoundException: PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand
Get-Content : Cannot find path
'D:\git\Chromium\cef-binary\cef_binary_3.2526.1373.gb660893_windows32\libcef_dll\libcef_dll_wrapper.vcxproj' because it does not exist.
At D:\git\Chromium\cef-binary\build.ps1:225 char:6
+ (Get-Content $CefProject) | Foreach-Object {$_ -replace "<RuntimeLibrary>Mul ...
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (D:\git\Chromium...wrapper.vcxproj:String) [Get-Content], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand
True
Microsoft (R) Build Engine version 12.0.40629.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.
Any help gratefully received!
Also asked on the CEF forum and on the CefSharp google group (not enough reputation to add another link)
The answer turned out to be frustratingly simple.
Firstly, ensure cmake is on your path, as advised by amaitland above.
Secondly, to avoid any further issues, ensure you've copied over both the 64 bit and 32 bit cef binaries.
Related
Trying to Import SQL Server module to use Invoke-Sqlcmd and whether in raw PowerShell ISE (as Administrator and non-Admin) or via SSMS I get the same error and wondering if someone could help please?
The version I am using is an unzipped nupkg of sqlserver.21.1.18230 (the latest release) and the DLL's are in the right location (C:\Program Files\WindowsPowerShell\Modules). The DLL's are not showing as Blocked in the Properties. Security is showing "Full Control" on the DLL in the Properties.
Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -recurse |
Get-ItemProperty -name Version,Release -EA 0 |
Where { $_.PSChildName -match '^(?!S)\p{L}'} |
Select PSChildName, Version, Release
##Get PowerShell version
$PSVersionTable
$Env:PSModulePath
#Get-PSRepository
Get-ExecutionPolicy -List
[Environment]::Is64BitProcess
Import-Module SqlServer
The Import-Module is failing with the following results (after the error a raft of other DLL's from the SqlServer.psm1 script are listed also erroring)
PSChildName Version Release
----------- ------- -------
v2.0.50727 2.0.50727.4927
v3.0 3.0.30729.4926
Windows Communication Foundation 3.0.4506.4926
Windows Presentation Foundation 3.0.6920.4902
v3.5 3.5.30729.4926
Client 4.8.03752 528040
Full 4.8.03752 528040
Client 4.0.0.0
C:\Users\app-itsme\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\windows\system32\WindowsPowerShell\v1.0\Modules
Import-Module : Could not load file or assembly 'file:///C:\Program Files\WindowsPowerShell\Modules\SqlServer\Microsoft.SqlServer.Management.PSSnapins.dll' or one of its dependencies. Operation is not
supported. (Exception from HRESULT: 0x80131515)
At C:\Program Files\WindowsPowerShell\Modules\SqlServer\SqlServer.psm1:61 char:25
+ ... $binaryModule = Import-Module -Name $binaryModulePath -PassThru
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Import-Module], FileLoadException
+ FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand
The variable '$binaryModule' cannot be retrieved because it has not been set.
At C:\Program Files\WindowsPowerShell\Modules\SqlServer\SqlServer.psm1:63 char:29
+ $importedModules += $binaryModule
+ ~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (binaryModule:String) [], RuntimeException
+ FullyQualifiedErrorId : VariableIsUndefined
Any help appreciated
Thank you
The issue was still around permissions and installation. Installation seemed to have to be at non-admin and then Install-Module at non-admin. It was then available as admin.
Also the Powershell admin doesnt have internet access something that Powershell assumes always exists which added to the woes of other solutions being attempted. Had to set proxy firewall etc
Thanks
Till yesterday my Visual studio was working properly with all C programs running perfectly. But today i got one error saying
Program 'a.exe' failed to run: The system cannot find the file specifiedAt line:1 char:1* .
+ ./a.exe
+ ~~~~~~~.
At line:1 char:1
+ ./a.exe
+ ~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
+ FullyQualifiedErrorId : NativeCommandFailed
This executable file was getting deleted by my McAfee automatically saying it detected a virus in it.
Please someone help me with this.
I was facing the same problem but what I do is turn off real time scanning for the time I am using vs code and then programs run. Though this is not permanent solution but this works temporarily for me.
You can exclude your project folder or where your a.exe is generated. Go through the steps given below:
Open your McAfee security software.
Click PC Security (on Windows).
Click Real-Time scanning.
Click Excluded Files.
Click Add files.
Browse to, and select the files, which you want to be excluded from the virus scan.
In this way, you can tell your virus scanner that these are known safe files not a trojan or malware.
There is no any fault of visual studio code or your Mingw Compiler. There is some issues with McAfee virus protector. I also had same problem. But I have change my virus protector and now my problem is solved.So you can try it.
I have VS2015 with SSDT installed, along with SSMS and the SqlServer PowerShell module (which includes the invoke-sqlcmd comand), and yet If I try to execute a query against an Azure SQL Data Warehouse like so:
invoke-sqlcmd -Query "Select top 5 * from customer" -ConnectionString "Server=tcp:my.database.windows.net,1433;Database=Customer; Authentication=Active Directory Integrated; Encrypt=True; "
I get the following error:
invoke-sqlcmd : Unable to load adalsql.dll (Authentication=ActiveDirectoryIntegrated). Error code: 0x2. For more information, see
http://go.microsoft.com/fwlink/?LinkID=513072
At line:1 char:1
+ invoke-sqlcmd -Query "Select top 5 * from vwOffer" -ConnectionStrin ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Invoke-Sqlcmd], SqlException
+ FullyQualifiedErrorId : SqlExectionError,Microsoft.SqlServer.Management.PowerShell.GetScriptCommand
invoke-sqlcmd :
At line:1 char:1
+ invoke-sqlcmd -Query "Select top 5 * from vwOffer" -ConnectionStrin ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ParserError: (:) [Invoke-Sqlcmd], ParserException
+ FullyQualifiedErrorId : ExecutionFailureException,Microsoft.SqlServer.Management.PowerShell.GetScriptComman
If I try and install adalsql.dll directly, I get a message stating that A higher version already exists and I can see the both versions of the dll can be found here:
C:\Windows\SysWOW64\adalsql.dll
C:\Windows\System32\adalsql.dll
and yet, invoke-sqlcmd cant find it. Any idea how to either (A) register the existing dll so invoke-sqlcmd can find it or (B) uninstall it so that it can be re-installed?
Incidentally, I am able to use Active Directory Authenticatoin with the 32-bit SQLCMD.exe, so I know the 32 bit dll is working fine. It's just the 64 bit dll that isn't loading properly...
So, this problem vexed me as well. I'm unclear as to how it happened, but maybe it's just coincidence that it happened when I installed the latest version of SSMS. My fix was to:
Navigate to Add or Remove Programs
In the little search window type sql, or just go find: "Active Directory Authentication Library for SQL Server".
Note: This will not be in Windows' installed programs list if you have installed Visual Studio 2019. You can run the same installer by invoking MsiExec.exe /I{6BF11ECE-3CE8-4FBA-991A-1F55AA6BE5BF} from a command prompt.
Uninstall that little guy
Navigate here and download the latest ADAL library (pick x64):
https://www.microsoft.com/en-us/download/confirmation.aspx?id=48742
Just for kicks, reboot
Your stuff should now properly load adalsql.dll!
Update #3, 2020-07-13: Installing the older version works, but is vulnerable to being clobbered by the SSMS and VS2019 installers. The reason the new version of ADAL doesn't work is because its installer fails to add a registry entry pointing to the 64-bit version of adal.dll. I added an answer below which includes the missing registry value, which you can add yourself. Once that's done, you should never need to do this dance again. - #Tullo_x86
The bewilderingly simple solution to this annoying problem
Ensure you actually have ADAL installed (the existence of C:\Windows\system32\adal.dll is plenty)
Paste this into a .reg file:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSADALSQL]
"TargetDir"="C:\\Windows\\System32\\adal.dll"
Double-click the .reg file to install that value
You're done. Go celebrate!
Explain WTF is going on. Why this is necessary?
This error happens because the .NET adapter for SQL Server can't find adal.dll. But why is this? It's installed, right?
Well, the installer for the latest version of ADAL (packaged with VS 2019 and the latest version of SQL Server Management Studio) adds a registry entry for the 32-bit version of the DLL (at C:\Windows\SysWOW64\adal.dll), but does not add the entry for the 64-bit version (which gets installed to C:\Windows\system32\adal.dll). If you build and run your application in 32-bit mode, you'll never see this bug manifest.
This is simply a bug in the ADAL installer. Presumably it wasn't detected by Microsoft because both Visual Studio and SSMS are 32-bit applications and thus don't go looking for the 64-bit version.
In my case culprit was VS 2019.
It has newer version of ADALSQL package. For me it was at path "C:\ProgramData\Microsoft\VisualStudio\Packages\sql_adalsql,version=16.0.61903.25110,chip=x64,language=en-US", which I uninstalled and installed desired version to resolve the issue.
Hope this helps!
In my case, add/remove programs didn't show any installed instances of "Active Directory Authentication Library". Yet, trying to install the library would fail saying a newer version was installed.
I un-wedged myself by opening the registry editor (regedt32) and using the Find feature from
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer
looking for adalsql.
That got a hit with containing keys
DisplayName: Active Directory Authentication Library for SQL Server
DisplayVersion: 15.0.1300.359
along with, importantly, a path to the associated installer. For me it was something like c:\windows\installer\4c334521.msi. I ran that msi and was finally able to "uninstall". After that, running the installer from the 'library' link above finally worked.
Or you if planned to upgrade SSMS in the time being, simply uninstall "Active Directory Authentication Library for SQL Server", and repair SSMS.
Next time you upgrade SSMS it won't broke anything. SSMS bring his own adalsql.dll, and know how to upgrade it when you upgrade SSMS. But if you had installed adalsql with something else (or using https://www.microsoft.com/en-us/download/confirmation.aspx?id=48742 ), SSMS is somehow broken.
I am having trouble doing an import-module ActiveDirectory on a Server 2008 SP2 (64 bit).
NET Framework 3.5 SP1 is installed
I download the Windows6.0-KB968934-x86.msu (for ADWS)
This file did not install saying that "The update does not apply to my system"
Doing some research (http://anti-american.rssing.com/chan-2091246/all_p15.html) I installed hotfix in KB article 969166 and the above update installed.
After a reboot, I noticed that in services, Active Directory Web Services is running
I opened an administrative PS prompt and performed an Import-Module ActiveDirectory, but...
...I get:
Import-Module : The specified module 'activedirectory' was not loaded because no valid module file was found in any module directory.
At line:1 char:14
+ import-module <<<< activedirectory
+ CategoryInfo : ResourceUnavailable: (activedirectory:String) [Import- Module], FileNotFoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
If its any help, here's some info in PSModule Path, modules and the version:
PS C:\Windows\system32> $env:PSModulePath
C:\Users\ischmd\Documents\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
PS C:\Windows\system32> Get-Module -ListAvailable
ModuleType Name ExportedCommands
---------- ---- ----------------
Manifest BitsTransfer {}
Manifest PSDiagnostics {}
PS C:\Windows\system32> $PSVersionTable.psversion
Major Minor Build Revision
----- ----- ----- --------
2 0 -1 -1
PS C:\Windows\system32> $host.version
Major Minor Build Revision
----- ----- ----- --------
2 0 -1 -1
Any help is greatly appreciated. The main purpose of this is to GET-AdUser command to automate some process but at this point, were stumped. My only conclusion is that this is not possible with Windows 2008 SP2...
AD Powershell module should be listed under installed Features. See image:
.
For non-servers this requires Remote Server Administration Tools for Windows __
Windows 7: http://www.microsoft.com/en-us/download/details.aspx?id=7887
Windows 8: http://www.microsoft.com/en-us/download/details.aspx?id=28972
Windows 10: https://www.microsoft.com/en-au/download/details.aspx?id=45520
The ActiveDirectory module for powershell can be installed by adding the RSAT-AD-Powershell feature.
In an elevated powershell window:
Add-WindowsFeature RSAT-AD-PowerShell
or
Enable-WindowsOptionalFeature -FeatureName ActiveDirectory-Powershell -Online -All
You can install the Active Directory snap-in with Powershell on Windows Server 2012 using the following command:
Install-windowsfeature -name AD-Domain-Services –IncludeManagementTools
This helped me when I had problems with the Features screen due to AppFabric and Windows Update errors.
Even better use implicit remoting to use a module from another Machine!
$s = New-PSSession Server-Name
Invoke-Command -Session $s -ScriptBlock {Import-Module ActiveDirectory}
Import-PSSession -Session $s -Module ActiveDirectory -Prefix REM
This will allow you to use the module off a remote PC for as long as the PSSession is connected.
More Information:
https://technet.microsoft.com/en-us/library/ff720181.aspx
On Windows 10 - This happened for me after the latest update in 2020.
What solved this issue for me was running the following in PowerShell
C:\>Install-Module -Name MicrosoftPowerBIMgmt
This may be an old post, but if anyone is still facing this issue after trying all the above mentioned steps, ensure whether the default path of PowerShell module is specified under the PSModulePath environment variable.
The default path should be %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\
If you don't have the Active Directory module installed on your machine, you need to download the correct Remote Server Administration Tools (RSAT) package for your OS.
https://learn.microsoft.com/en-US/troubleshoot/windows-server/system-management-components/remote-server-administration-tools#rsat-for-windows-10-platform-and-tools-support-matrix
If you are running windows 10 you can download Remote Server Administration Tools for Windows 10 update from here https://www.microsoft.com/en-us/download/details.aspx?id=45520
Once installed run 'import-module ActiveDirectory' using elevated PowerShell.
According to the documentation, pre-release versioning is supported, with an example given of:
Within the NuSpec file, specify the version in the element
<version>1.0.1-alpha</version>
I am building from a .nuspec file; if I include this line verbatim, then run (at the package manager console):
PM> nuget pack "Nuget\protobuf-net.nuspec"
then I get a bit fat error:
Attempting to build package from 'protobuf-net.nuspec'.
NuGet.exe : Input string was not in a correct format.
At line:1 char:6
+ nuget <<<< pack "Nuget\protobuf-net.nuspec"
+ CategoryInfo : NotSpecified: (Input string wa...correct format.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
If, however, I just use <version>1.0.1</version> and run exactly the same command, then I get:
Attempting to build package from 'protobuf-net.nuspec'.
Successfully created package 'C:\Dev\protobuf-net\protobuf-net.1.0.1.nupkg'.
And indeed, it has built correctly. My NuGet Package Manager reports version 2.0.30625.9003.
So: am I doing something wrong? or did they break something?
NuGet Version: 1.5.21005.9019
Semantic versioning was introduced in nuget 1.6. Time for an upgrade. You can use nuget update -self to update right from the command line.