Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example builds using old version of Excel DNA #7

Open
Zupnik opened this issue Feb 27, 2018 · 1 comment
Open

Example builds using old version of Excel DNA #7

Zupnik opened this issue Feb 27, 2018 · 1 comment

Comments

@Zupnik
Copy link

Zupnik commented Feb 27, 2018

Your Logging example works fine for me out of the box, but when I use NuGet to get the latest version of Excel DNA (0.34.6) and use the command 'Update-Package -reinstall', all logs go through the Diagnostic Display regardless of what I do.

image

The build event code ends up being replaced with:
<PostBuildEvent> </PostBuildEvent> </PropertyGroup> <Import Project="packages\ExcelDna.AddIn.0.34.6\tools\ExcelDna.AddIn.targets" Condition="Exists('packages\ExcelDna.AddIn.0.34.6\tools\ExcelDna.AddIn.targets')" /> <Target Name="EnsureExcelDnaTargetsImported" BeforeTargets="BeforeBuild" Condition="'$(ExcelDnaTargetsImported)' == ''"> <Error Condition="!Exists('packages\ExcelDna.AddIn.0.34.6\tools\ExcelDna.AddIn.targets') And ('$(RunExcelDnaBuild)' != '' And $(RunExcelDnaBuild))" Text="You are trying to build with ExcelDna, but the NuGet targets file that ExcelDna depends on is not available on this computer. This is probably because the ExcelDna package has not been committed to source control, or NuGet Package Restore is not enabled. Please enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" /> <Error Condition="Exists('packages\ExcelDna.AddIn.0.34.6\tools\ExcelDna.AddIn.targets') And ('$(RunExcelDnaBuild)' != '' And $(RunExcelDnaBuild))" Text="ExcelDna cannot be run because NuGet packages were restored prior to the build running, and the targets file was unavailable when the build started. Please build the project again to include these packages in the build. You may also need to make sure that your build server does not delete packages prior to each build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" /> </Target> <PropertyGroup> <PreBuildEvent> </PreBuildEvent>

See:

"$(ProjectDir)packages\Excel-DNA.0.32.0\tools\ExcelDnaPack.exe" "$(TargetDir)Logging-AddIn64.dna" /Y</PostBuildEvent>

@govert
Copy link
Member

govert commented Feb 28, 2018

@Zupnik Not sure about the message you see there - it seems to be an unrelated NuGet issue.
For the logging you should check that the .xll.config file is getting copied to the output directory. I believe the new build implementation deals with .config files a bit differently. I remember having to set an app.config file to either "Build Action: None" or "Build Action: Content" for it to be processed to the output directory. But in the sample the .config file have the full name, so not sure it applies...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants