Build NuGet Package

90 views
Skip to first unread message

Gerculy Robert

unread,
May 16, 2015, 2:14:19 PM5/16/15
to cefs...@googlegroups.com
Hello, 
There been recently some updates made on cefsharp-2272 ( thanks to amaitland ) and I would like to use the latest changes on my project however I don't know how to make it working.
I download the 2272 branch, I build it with build.ps1 but I don't know how to build nuget packages.
I search for tutorials but couldn't understand really. 
Anyone can guide me.

Thank you. 
Message has been deleted

Christian LeMoussel

unread,
May 18, 2015, 1:03:23 PM5/18/15
to cefs...@googlegroups.com
You can download CEF V 3.2272.30 packages on cefsharp-myget
But actually, there is a little problem. it's not possible to install  CefSharp.OffScreen package via cefsharp-myget because CefSharp.OffScreen has a dependance with cef.redist = 3.2272.25 NOT 3.2272.30

Jørn Hansen

unread,
May 18, 2015, 3:25:40 PM5/18/15
to cefs...@googlegroups.com
Christian, 

Thanks for spotting! Sorry havent the time right now to look into. That sounds like something you could easily try adjusting in this line https://github.com/cefsharp/CefSharp/blob/cef/2272/build.ps1#L10 and verify?

Best Regards,
JornH 

Jørn Hansen

unread,
May 18, 2015, 3:29:58 PM5/18/15
to cefs...@googlegroups.com
Hi,

You're close :-) `build.ps1` takes care of making the NuGet packages for you (see https://github.com/cefsharp/CefSharp/blob/cef/2272/build.ps1#L253-L259 )

Take a look int the `/nugets/` folder 

Best regards,
JornH

Gerculy Robert

unread,
May 18, 2015, 4:01:05 PM5/18/15
to cefs...@googlegroups.com
Hi, I found that out this morning, ** the documentation is good, you just have to read it the right way and right order :) ** there is something wrong with my environment.

ERROR: Cannot determine the location of the VS Common Tools folder.

[ ABOUT 1000 WARNINGS - NO JOKE ] 

Die : Build failed
At C:\Users\Robert\Desktop\CefSharp-cef-2272\build.ps1:196 char:12
+         Die <<<<  "Build failed"
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Die

 Since on my last Windows installation I only give to C partition 100 GB I had to install Visual Studio on  D partition, this might be one of the reasons  that VS Common Tools cannot be found. I will reinstall my windows now, increase my C partition, and install Visual Studio to C drive. If that not works then I'm not sure what else can be. 

Christian LeMoussel

unread,
May 18, 2015, 4:37:26 PM5/18/15
to cefs...@googlegroups.com
Jorn,

I think there's a bug with directories having a space. With my environnement I got this error

Restore Nuget Packages

Tous les packages répertoriés dans packages.config sont déjà installés.

Starting to build targeting toolchain v110


Targeting v110 using configuration Release on platform x86

True
stdout: Microsoft (R) Build Engine, version 4.6.57.0
[Microsoft .NET Framework, Version 4.0.30319.0]
Copyright (C) Microsoft Corporation. Tous droits réservés.

MSBUILD : error MSB1008: Un seul projet peut être spécifié.
Commutateur : Project\CEF\CefSharp\2272\CefSharp-cef-2272\CefSharp3.sln

Pour la syntaxe du commutateur, tapez "MSBuild /help"

stderr:

Die : Build failed
Au niveau de C:\Users\lemoussel\SkyDrive\VS Project\CEF\CefSharp\2272\CefSharp-cef-2272\build.ps1 : 196 Caractère : 12

+         Die <<<<  "Build failed"
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Die



Cefsharp Projet is in C:\Users\lemoussel\SkyDrive\VS Project\CEF\CefSharp\2272\CefSharp-cef-2272\
But $CefSln seem to contain Project\CEF\CefSharp\2272\CefSharp-cef-2272\
Perhaps the bug is in line 15: $CefSln = Join-Path $WorkingDir 'CefSharp3.sln'

Sorry for my poor explication but I don't know PowerShell.

Rem : Make I do an issue on GitHub project ?


Regards.

Christian.

Gerculy Robert

unread,
May 19, 2015, 4:08:38 AM5/19/15
to cefs...@googlegroups.com
I reinstalled everything but I still getting the Cannot determine the location of the VS Common Tools folder error.
I searched on google but couldn't find anything usefully.
Anyone any ideas ? 
I'm using VS 2013 with Windows 10.

Alex Maitland

unread,
May 19, 2015, 4:39:26 AM5/19/15
to cefs...@googlegroups.com
Release builds are done using `VS2012`. You'll need to modify the script slightly to use `VS2013`

Edit `build.ps1` to use `VS2013` instead of `VS2012`
https://github.com/cefsharp/CefSharp/blob/master/build.ps1#L300

Gerculy Robert

unread,
May 19, 2015, 4:44:43 AM5/19/15
to cefs...@googlegroups.com
Thanks for that.
Getting closer :P

PS C:\Users\rgerc\Documents\Visual Studio 2013\Projects\CefSharp-cef-2272> C:\Users\rgerc\Documents\Visual Studio 2013\Projects\CefSharp-cef-2272\build.ps1

Restore Nuget Packages

All packages listed in packages.config are already installed.

Starting to build targeting toolchain v120


Targeting v120 using configuration Release on platform x86

True
stdout: Microsoft (R) Build Engine version 12.0.31101.0
[Microsoft .NET Framework, version 4.0.30319.0]
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1008: Only one project can be specified.
Switch: Studio

For switch syntax, type "MSBuild /help"

stderr: 

Die : Build failed
At C:\Users\rgerc\Documents\Visual Studio 2013\Projects\CefSharp-cef-2272\build.ps1:196 char:9
+         Die "Build failed"
+         ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Die
 

PS C:\Users\rgerc\Documents\Visual Studio 2013\Projects\CefSharp-cef-2272> 


Where line 196

    if($Process.ExitCode -ne 0)
    {
        Write-Host "stdout: $stdout"
        Write-Host "stderr: $stderr"
        Die "Build failed"
    }


Alex Maitland

unread,
May 19, 2015, 5:35:09 AM5/19/15
to cefs...@googlegroups.com
Grab the latest `2272`, I made the script slightly easier. You can now just run `.\build vs2013`
(Default is still `VS2012` of course)

https://github.com/cefsharp/CefSharp/commit/bd4c7c5406ae3b6fc14d42dc1d38957a5c4f9bae

Christian LeMoussel

unread,
May 19, 2015, 12:24:36 PM5/19/15
to cefs...@googlegroups.com
Alex,

It's OK with this script version Change default build target to vs2012, remove the old Nupkg target, a…
But for 2272 branch  I update to this
param(
    [ValidateSet("vs2013", "vs2012", "nupkg-only")]
    [Parameter(Position = 0)]
    [string] $Target = "vs2012",
    [Parameter(Position = 1)]
    [string] $Version = "41.0.0-pre01",
    [Parameter(Position = 2)]
    [string] $AssemblyVersion = "41.0.0",
    [Parameter(Position = 3)]
    [string] $RedistVersion = "3.2272.30"
)

I am not familiar with building Nuget packages.
After building, in NuGet directiretory I Have
CefSharp.Common.41.0.0-pre01.nupkg
CefSharp.OffScreen.41.0.0-pre01.nupkg
CefSharp.WinForms.41.0.0-pre01.nupkg
CefSharp.Wpf.41.0.0-pre01.nupkg


How can I use this new NuGet package in VS?
Should I create my own Myget and uploading packages to my Myget account?





Gerculy Robert

unread,
May 19, 2015, 4:00:55 PM5/19/15
to cefs...@googlegroups.com
I got an error again.



PS C:\Users\rgerc\Desktop\CefSharp-cef-2272> .\build vs2013
Restore Nuget Packages
All packages listed in packages.config are already installed.
Starting to build targeting toolchain v120
Targeting v120 using configuration Release on platform x86
Die : Error unable to find any visual studio environment

At C:\Users\rgerc\Desktop\CefSharp-cef-2272\build.ps1:143 char:9
+         Die 'Error unable to find any visual studio environment'
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   
+ CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
   
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Die

So finally, I installed VS 2012 and managed to build the packages.
Still don't know why wont work with 2013 but I've got what I need. ( Me not being selfish haha )

Thanks for your help guys.

On Saturday, 16 May 2015 19:14:19 UTC+1, Gerculy Robert wrote:
Message has been deleted

Gerculy Robert

unread,
May 20, 2015, 2:41:36 AM5/20/15
to cefs...@googlegroups.com
You can install it directly form your PC.
Go to TOOLS > NuGet Package Manager > Package Manager Settings  > Package Sources > and add a new one, 
Name : Whatever you want
For source choose the folder NuGet from CefSharp-cef-2272 folder.

https://www.dropbox.com/s/zy0yvbtgcceqhbk/Screenshot%202015-05-20%2007.35.16.png?dl=0

Then go to TOOLS > Manage NuGet Packages for Solution > Updates > All > and now you can update. ( Make sure you select Include Prerelease )

Alex Maitland

unread,
May 20, 2015, 4:18:18 AM5/20/15
to cefs...@googlegroups.com
Fixed up the `2272.30` reference, thanks for spotting that.

https://github.com/cefsharp/CefSharp/commit/e8d9042fbbaff93a48011a627c944d8f0997f855

Christian LeMoussel

unread,
May 20, 2015, 12:29:31 PM5/20/15
to cefs...@googlegroups.com
Thank you very much Robert.

A bientôt.

Christian.

Reply all
Reply to author
Forward
0 new messages