Open Triniman64 opened 2 years ago
I'm sorry that you're having trouble. PdfMerge is definitely a work in progress, but I am able to build and run it on my system.
The warning errors that you're getting are strange, such as: "Warning The referenced component 'System' could not be found. PDFmerge" "Warning The referenced component 'Microsoft.CSharp' could not be found. PDFmerge"
That's really strange that VS can't find "System" or "Microsoft.CSharp". Have you tried restarting Visual Studio?
Another possible solution is to comment out a few lines in the Project File: PDFmerge.csproj. Open that file in a text editor and comment out lines 164-171, as shown in the screenshot below. Then reload the project and try building and running it agian.
You can try changing the target framework from .NET 4.6 to .NET 4.8, but it might throw some errors. You might have to update the NuGet Packages to work with .NET 4.8, if they even support .NET 4.8.
The only NuGet packages that you should need are: Microsoft.Web.WebView2 and PDFsharp. I'm using WebView2 version 1.0.1245.22 and PDFsharp version 1.50.5147.
I'm using VS 2019 currently. I haven't upgraded to VS 2022, so I'm not sure if that changes anything.
Best of luck. Let me know if you have any other questions.
Hi @hambone-the-Great,
Quick questions and answers (hopefully).
1. I'm using Visual Studio 2022 and received the following 18 warnings after cloning your project locally on my laptop.
ERROR LIST: Severity Code Description Project File Line Suppression State Warning The referenced component 'Microsoft.CSharp' could not be found. PDFmerge Warning The referenced component 'Microsoft.VisualBasic' could not be found. PDFmerge Warning The referenced component 'Microsoft.Web.WebView2.Core' could not be found. PDFmerge Warning The referenced component 'Microsoft.Web.WebView2.WinForms' could not be found. PDFmerge Warning The referenced component 'Microsoft.Web.WebView2.Wpf' could not be found. PDFmerge
Warning The referenced component 'PdfSharp' could not be found. PDFmerge
Warning The referenced component 'PdfSharp.Charting' could not be found. PDFmerge
Warning The referenced component 'System' could not be found. PDFmerge
Warning The referenced component 'System.Core' could not be found. PDFmerge
Warning The referenced component 'System.Data' could not be found. PDFmerge
Warning The referenced component 'System.Data.DataSetExtensions' could not be found. PDFmerge Warning The referenced component 'System.Deployment' could not be found. PDFmerge
Warning The referenced component 'System.Drawing' could not be found. PDFmerge Warning The referenced component 'System.Net.Http' could not be found. PDFmerge
Warning The referenced component 'System.Windows.Forms' could not be found. PDFmerge
Warning The referenced component 'System.Xml' could not be found. PDFmerge
Warning The referenced component 'System.Xml.Linq' could not be found. PDFmerge
Warning This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\Microsoft.Web.WebView2.1.0.1108.44\build\Microsoft.Web.WebView2.targets. PDFmerge C:...\source\PDFmerge\PDFmerge.csproj 168
2. Installing Net Framework 4.6 is not possible because the installer stated my system has the most current version and I prefer not to uninstall it in order to rollback to 4.6.
3. Any attempt to update the References via NuGet Package Manager, e.g. Microsoft.CSharp resulted in the following error messages in the Output and Error List panes:
OUTPUT PANE: Attempting to gather dependency information for package 'Microsoft.CSharp.4.7.0' with respect to project 'PDFmerge', targeting '.NETFramework,Version=v4.8' Gathering dependency information took 146 ms Attempting to resolve dependencies for package 'Microsoft.CSharp.4.7.0' with DependencyBehavior 'Lowest' Resolving dependency information took 0 ms Resolving actions to install package 'Microsoft.CSharp.4.7.0' Resolved actions to install package 'Microsoft.CSharp.4.7.0' Adding package 'Microsoft.CSharp.4.7.0' to folder 'C:...\source\packages' Added package 'Microsoft.CSharp.4.7.0' to folder 'C:...\source\packages' Added package 'Microsoft.CSharp.4.7.0' to 'packages.config' Successfully installed 'Microsoft.CSharp 4.7.0' to PDFmerge Executing nuget actions took 1.25 sec Time Elapsed: 00:00:02.4090461 ========== Finished ==========
ERROR LIST: Severity Code Description Project File Line Suppression State Warning This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\Microsoft.Web.WebView2.1.0.1108.44\build\Microsoft.Web.WebView2.targets. PDFmerge C:...\source\PDFmerge\PDFmerge.csproj 168
4. Clicking the "Restore" button in the NuGet ribbon does nothing, the list of References with Exclamation symbols does not change.
5. Selecting a previous version, eg. 4.0.0 resulted in the following detailed error message in the Output Pane:
OUTPUT PANE: Attempting to gather dependency information for package 'Microsoft.CSharp.4.0.0' with respect to project 'PDFmerge', targeting '.NETFramework,Version=v4.8' Gathering dependency information took 4 ms Attempting to resolve dependencies for package 'Microsoft.CSharp.4.0.0' with DependencyBehavior 'Lowest' One or more unresolved package dependency constraints detected in the existing packages.config file. All dependency constraints must be resolved to add or update packages. If these packages are being updated this message may be ignored, if not the following error(s) may be blocking the current package operation: 'Microsoft.CSharp 4.7.0' Resolving dependency information took 0 ms Resolving actions to install package 'Microsoft.CSharp.4.0.0' Resolved actions to install package 'Microsoft.CSharp.4.0.0' Removed package 'Microsoft.CSharp.4.7.0' from 'packages.config' Successfully uninstalled 'Microsoft.CSharp.4.7.0' from PDFmerge Adding package 'Microsoft.CSharp.4.0.0' to folder 'C:...\source\packages' Added package 'Microsoft.CSharp.4.0.0' to folder 'C:...\source\packages' Added package 'Microsoft.CSharp.4.0.0' to 'packages.config' Successfully installed 'Microsoft.CSharp 4.0.0' to PDFmerge Removing package 'Microsoft.CSharp.4.7.0' from folder 'C:...\source\packages' Removed package 'Microsoft.CSharp.4.7.0' from folder 'C:...\source\packages' Executing nuget actions took 517 ms Time Elapsed: 00:00:01.3641935 ========== Finished ==========
I've included the following screen captures to assist with your review.
Visual Studio 2022 INFO
Microsoft Visual Studio Community 2022 Version 17.2.3 VisualStudio.17.Release/17.2.3+32526.322 Microsoft .NET Framework Version 4.8.04084
Installed Version: Community
Visual C++ 2022 00482-90000-00000-AA410 Microsoft Visual C++ 2022
ASP.NET and Web Tools 2019 17.2.392.13739 ASP.NET and Web Tools 2019
Azure App Service Tools v3.0.0 17.2.392.13739 Azure App Service Tools v3.0.0
C# Tools 4.2.0-4.22252.24+47cdc16a21bbb8a4aadfb666b011e2059e1be5d2 C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Common Azure Tools 1.10 Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
Cookiecutter 17.0.22089.1 Provides tools for finding, instantiating and customizing templates in cookiecutter format.
Microsoft JVM Debugger 1.0 Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
NuGet Package Manager 6.2.0 NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/
Python - Django support 17.0.22089.1 Provides templates and integration for the Django web framework.
Python - Profiling support 17.0.22089.1 Profiling support for Python projects.
Python - VC Project Support 17.0.21344.1 Provides support for launching C++ projects with Python debugging enabled.
Python with Pylance 17.0.22089.1 Provides IntelliSense, projects, templates, debugging, interactive windows, and other support for Python developers.
Test Adapter for Boost.Test 1.0 Enables Visual Studio's testing tools with unit tests written for Boost.Test. The use terms and Third Party Notices are available in the extension installation directory.
Test Adapter for Google Test 1.0 Enables Visual Studio's testing tools with unit tests written for Google Test. The use terms and Third Party Notices are available in the extension installation directory.
TypeScript Tools 17.0.10418.2001 TypeScript Tools for Microsoft Visual Studio
Visual Basic Tools 4.2.0-4.22252.24+47cdc16a21bbb8a4aadfb666b011e2059e1be5d2 Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Visual F# Tools 17.1.0-beta.22253.3+058e7a7e597a02c129f38742f250a4b212da9ee3 Microsoft Visual F# Tools
Visual Studio IntelliCode 2.2 AI-assisted development for Visual Studio.