VS2013 Driver Package Failure

I asked last week about Inf2Cat failure in VS2013 driver package builds. We
have been able to isolate the problem to the location of the sys file. The
driver project places the sys file in LEC2PCI\Win7Release, but the Package
build will fail on the Inf2Cat command unless we manually copy the sys file
to the “LEC2PCI Package” directory under LEC2PCI\Win7Release.

Now I assume that something is wrong with the configuration so that it
either is not getting the sys from the right place, or the sys is not being
copied to the right place before the Inf2Cat, but I don’t have a clue how
the VS solution got messed up.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com

Don Burn wrote:

I asked last week about Inf2Cat failure in VS2013 driver package builds. We
have been able to isolate the problem to the location of the sys file. The
driver project places the sys file in LEC2PCI\Win7Release, but the Package
build will fail on the Inf2Cat command unless we manually copy the sys file
to the “LEC2PCI Package” directory under LEC2PCI\Win7Release.

Now I assume that something is wrong with the configuration so that it
either is not getting the sys from the right place, or the sys is not being
copied to the right place before the Inf2Cat, but I don’t have a clue how
the VS solution got messed up.

The package project imports the primary project and reads information
out of there. Have you changed any of the destination directories? I,
for example, hate the “Win7Release” and “x64/Win7Release” naming scheme,
so I change all of my projects to use “Win7Release” and
“Win7Release64”. That means I have to modify both the main project and
the package project.

The package project prints the files it is copying as the first thing in
its log. Do you see it doing any copying?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Tim,

As far as I know no directory files were changed, and I don’t see the
copy in the rebuild of the solution below:

1>------ Rebuild All started: Project: LEC2PCI, Configuration: Win7 Release
Win32 ------
1> Stamping .\Win7Release\LEC2PCI.inf [Version] section with
DriverVer=10/14/2014,15.5.48.142
1> isrdpc.c
1> LEC2PCI.C
1> lec_flash.c
1> MessageQ.c
1> Generating Code…
1> LEC2PCI.vcxproj -> C:\Work\Lanmark\LEC2PCI\Win7Release\LEC2PCI.sys
2>------ Rebuild All started: Project: LEC2PCI Package, Configuration: Win7
Release Win32 ------
2> …
2> Signability test failed.
2>
2> Errors:
2> 22.9.1: lec2pci.sys in [lec2pci.copyfiles] of \lec2pci.inf is missing or
cannot be decompressed from source media. Please verify all path values
specified in SourceDisksNames, SouceDisksFiles, and CopyFiles sections
resolve to the actual location of the file, and are expressed in terms
relative to the location of the inf.
2>
2> Warnings:
2> None
2>Win7Release\inf2catOutput.log : Inf2Cat error -2: “Inf2Cat, signability
test failed.” Double click to see the tool output.
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Tuesday, October 14, 2014 3:02 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] VS2013 Driver Package Failure

Don Burn wrote:

I asked last week about Inf2Cat failure in VS2013 driver package
builds. We have been able to isolate the problem to the location of
the sys file. The driver project places the sys file in
LEC2PCI\Win7Release, but the Package build will fail on the Inf2Cat
command unless we manually copy the sys file to the “LEC2PCI Package”
directory under LEC2PCI\Win7Release.

Now I assume that something is wrong with the configuration so that it
either is not getting the sys from the right place, or the sys is not
being copied to the right place before the Inf2Cat, but I don’t have a
clue how the VS solution got messed up.

The package project imports the primary project and reads information out of
there. Have you changed any of the destination directories? I, for
example, hate the “Win7Release” and “x64/Win7Release” naming scheme, so I
change all of my projects to use “Win7Release” and “Win7Release64”. That
means I have to modify both the main project and the package project.

The package project prints the files it is copying as the first thing in its
log. Do you see it doing any copying?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

If you open the properties of the package project you can explicitly specify where to copy files from

d

Bent from my phone


From: Don Burnmailto:xxxxx
Sent: ?10/?14/?2014 12:07 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE: [ntdev] VS2013 Driver Package Failure

Tim,

As far as I know no directory files were changed, and I don’t see the
copy in the rebuild of the solution below:

1>------ Rebuild All started: Project: LEC2PCI, Configuration: Win7 Release
Win32 ------
1> Stamping .\Win7Release\LEC2PCI.inf [Version] section with
DriverVer=10/14/2014,15.5.48.142
1> isrdpc.c
1> LEC2PCI.C
1> lec_flash.c
1> MessageQ.c
1> Generating Code…
1> LEC2PCI.vcxproj -> C:\Work\Lanmark\LEC2PCI\Win7Release\LEC2PCI.sys
2>------ Rebuild All started: Project: LEC2PCI Package, Configuration: Win7
Release Win32 ------
2> …
2> Signability test failed.
2>
2> Errors:
2> 22.9.1: lec2pci.sys in [lec2pci.copyfiles] of \lec2pci.inf is missing or
cannot be decompressed from source media. Please verify all path values
specified in SourceDisksNames, SouceDisksFiles, and CopyFiles sections
resolve to the actual location of the file, and are expressed in terms
relative to the location of the inf.
2>
2> Warnings:
2> None
2>Win7Release\inf2catOutput.log : Inf2Cat error -2: “Inf2Cat, signability
test failed.” Double click to see the tool output.
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Tuesday, October 14, 2014 3:02 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] VS2013 Driver Package Failure

Don Burn wrote:
> I asked last week about Inf2Cat failure in VS2013 driver package
> builds. We have been able to isolate the problem to the location of
> the sys file. The driver project places the sys file in
> LEC2PCI\Win7Release, but the Package build will fail on the Inf2Cat
> command unless we manually copy the sys file to the “LEC2PCI Package”
directory under LEC2PCI\Win7Release.
>
> Now I assume that something is wrong with the configuration so that it
> either is not getting the sys from the right place, or the sys is not
> being copied to the right place before the Inf2Cat, but I don’t have a
> clue how the VS solution got messed up.

The package project imports the primary project and reads information out of
there. Have you changed any of the destination directories? I, for
example, hate the “Win7Release” and “x64/Win7Release” naming scheme, so I
change all of my projects to use “Win7Release” and “Win7Release64”. That
means I have to modify both the main project and the package project.

The package project prints the files it is copying as the first thing in its
log. Do you see it doing any copying?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>

On VS2013, rigth click on the “LEC2PCI Package” project in the solution explorer and then choose “Properties”. A new dialog appears: at the top of the left panel click on “Common properties”. The rigth pane should contain the package’s references.

The LEC2PCI project should appear on the list of referenced projects. If the LEC2PCI project is not referenced, it can be added by clicking the “Add new reference…” button on the bottom of the dialog.

The dependency is there just fine, just not the copy. Doron states I should
be able to see in the properties where to copy from, but it ain’t obvious.
More to the point, can someone give me any ideas of how the copy got
eliminated? I don’t want my customer walking off this cliff again.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@hotmail.com
Sent: Tuesday, October 14, 2014 3:19 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] VS2013 Driver Package Failure

On VS2013, rigth click on the “LEC2PCI Package” project in the solution
explorer and then choose “Properties”. A new dialog appears: at the top of
the left panel click on “Common properties”. The rigth pane should contain
the package’s references.

The LEC2PCI project should appear on the list of referenced projects. If the
LEC2PCI project is not referenced, it can be added by clicking the “Add new
reference…” button on the bottom of the dialog.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

I was talking about a reference not a dependency.

The reference is there. My customer is to the point of asking me what it
would take to rollback to the Win7 WDK and forget the GUI.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@hotmail.com
Sent: Tuesday, October 14, 2014 3:57 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] VS2013 Driver Package Failure

I was talking about a reference not a dependency.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Your customer should not move to the WDK 7 unless he w
ants to build Windows XP or Vista compatible binaries. The IDE is not the most important thing. The important parts are source files, INF file, etc… If the solution happens to be broken, your customer could create a brand new one and copy old input files to the new solution, overwritting new generated files. The project doesn’t seem to have dozens of files, so this should be much faster. Just give it a try.

I know that the WDK 8.1 Sample Kit (100Mb) was updated for use with VS2013. Did your customer started working on this project with the WDK 8.0 version of the PCIDRV sample ?

No they did not. The reason they are talking about reverting is the
perceived fragility of the environment. You sneeze around the properties
and nothing works any more. Their attitude is give them something that can
easily track the changes (forget that with project and solution files), and
easily can be rolled back to a working version.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@hotmail.com
Sent: Tuesday, October 14, 2014 4:20 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] VS2013 Driver Package Failure

Your customer should not move to the WDK 7 unless he w ants to build Windows
XP or Vista compatible binaries. The IDE is not the most important thing.
The important parts are source files, INF file, etc… If the solution
happens to be broken, your customer could create a brand new one and copy
old input files to the new solution, overwritting new generated files. The
project doesn’t seem to have dozens of files, so this should be much faster.
Just give it a try.

I know that the WDK 8.1 Sample Kit (100Mb) was updated for use with VS2013.
Did your customer started working on this project with the WDK 8.0 version
of the PCIDRV sample ?


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

The LEC2PCI.SYS binary is produced by the linker. So your customer should look at “Output File” property of the Linker property dialog. Rigth-click on LEC2PCI project, click “Linker”, then “General”. The default value for “Output File” is:

$(OutDir)$(TargetName)$(TargetExt)

Note that editing properties make changes apply only to the selected configuration (Win7) and platform (Win32).

The output is still the default value, but as I pointed out rather than the
OutDir for the driver project, INF2CAT looks in the package directory AND
THE COPY TO THERE IS MISSING FROM THE PROJECT, and I can’t even find where
the values should be!!!

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@hotmail.com
Sent: Tuesday, October 14, 2014 5:12 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] VS2013 Driver Package Failure

The LEC2PCI.SYS binary is produced by the linker. So your customer should
look at “Output File” property of the Linker property dialog. Rigth-click on
LEC2PCI project, click “Linker”, then “General”. The default value for
“Output File” is:

$(OutDir)$(TargetName)$(TargetExt)

Note that editing properties make changes apply only to the selected
configuration (Win7) and platform (Win32).


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Try adding the following FilesToPackage items in the LEC2PCI.vcxproj file. There should be a FilesToPackage dedicated ItemGroup in the project file. Edit the project file outside the IDE. When the file is saved, the IDE should prompt you to reload the project file.







To display the files being packaged, add the following “custom.targets” file in the project’s directory:






Then edit the LEC2PCI.vcxproj file and change the Project root element
to add the DisplayMessages target. The root element should look like this:



Finally, at the bottom of the project’s file, add the following XML element as a child of the “Project” element:


Save all, and then rebuild the entire solution. You should get the following output:

-----------------------------------
1>------ Rebuild All started: Project: MyTestDriver, Configuration: Win7 Release Win32 ------
1> Stamping Win7Release\MyTestDriver.inf [Version] section with DriverVer=10/15/2014,2.7.23.904
1> Device.c
1> Driver.c
1> Queue.c
1> Generating Code…
1> MyTestDriver.vcxproj -> D:\Data\Projects\MyTestDriver\Win7Release\MyTestDriver.sys
1> Project’s package files: D:\Data\Projects\MyTestDriver\Win7Release\MyTestDriver.sys;Win7Release\MyTestDriver.inf;C:\Program Files (x86)\Windows Kits\8.1\redist\wdf\x86\WdfCoinstaller01011.dll
2>------ Rebuild All started: Project: MyTestDriver Package, Configuration: Win7 Release Win32 ------
2> …
2> Signability test complete.
2>
2> Errors:
2> None
2>
2> Warnings:
2> None
2>
2> Catalog generation complete.
2> D:\Data\Projects\MyTestDriver\Win7Release\MyTestDriver Package\mytestdriver.cat
========== Rebuild All: 2 succeeded, 0 failed, 0 skipped ==========

I Hope this could help.

Telling my customer to edit XML is a sure way for them to rethink the whole
use of Windows!!! As a classic quote says " XML is like violence. Sure,
it seems like a quick and easy solution at first, but then it spirals out of
control into utter chaos."

SO COULD SOMEONE TELL ME ANY OF THE FOLLOWING:

  1. Where in the multitude of options in properties should the copy
    information have been?
  2. What are likely or even possible scenarios for this getting screwed up,
    so I can tell my customer not to do this again?

The predecessor’s to XML were called out by a number of us as being a stupid
mistake almost 35 years ago, some of use questioned Microsoft on repeating
this mistake over 10 years ago, can we avoid any more XML mistakes.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@hotmail.com
Sent: Tuesday, October 14, 2014 5:31 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] VS2013 Driver Package Failure

Try adding the following FilesToPackage items in the LEC2PCI.vcxproj file.
There should be a FilesToPackage dedicated ItemGroup in the project file.
Edit the project file outside the IDE. When the file is saved, the IDE
should prompt you to reload the project file.

Include=“$(SolutionDir)$(Platform)$(ConfigurationName)\LEC2PCI.sys”
Condition=“$(Platform)==‘x64’”>


Condition=“$(Platform)==‘Win32’”>



NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

  1. Project’s properties -> Configuration properties -> Driver Install -> Packaged Files.
  2. These an issue regarding the particular case of editing packaged files. If you click an entry to edit it and then select a region of text to delete it, then clicking the “delete” key will delete the entire entry and this entry is gone and the currently selected configuration may be broken. So you have to be careful there.

Remember that .NET was the ultimate response from Microsoft to Java and that’s why I think XML is so present in .NET. MSBUILD.EXE is very powerful and a driver writer MUST learn how to write MSBUILD project flles.

Sorry I meant “hitting the delete key” not “clicking the delete key”.

On 10/14/2014 3:30 PM, xxxxx@hotmail.com wrote:

Try adding the following FilesToPackage items in the LEC2PCI.vcxproj file. There should be a FilesToPackage dedicated ItemGroup in the project file. Edit the project file outside the IDE. When the file is saved, the IDE should prompt you to reload the project file.

You can edit the project file within the IDE, which gives you
IntelliSense for the XML. Just right-click the project (e.g. ‘abc’) in
the Solution Explorer tree, select ‘Unload Project’, then after it has
unloaded right-click it again and select ‘Edit abc.vcxproj’.


Bruce

> You can edit the project file within the IDE, which gives you
IntelliSense for the XML. Just right-click the project (e.g. ‘abc’) in
the Solution Explorer tree, select ‘Unload Project’, then after it has
unloaded right-click it again and select ‘Edit abc.vcxproj’.

Goog tip, thanks.

Don Burn wrote:

No they did not. The reason they are talking about reverting is the
perceived fragility of the environment. You sneeze around the properties
and nothing works any more. Their attitude is give them something that can
easily track the changes (forget that with project and solution files), and
easily can be rolled back to a working version.

I disagree. I now treat the project and solution files like makefiles
on steroids. I edit them all by hand. I almost never enter the IDE,
and when I do I don’t make project file changes.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.